且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

引起:java.lang.IllegalArgumentException:模式不能为空或为空

更新时间:2021-09-23 08:29:29

在您的安全配置中,您使用的属性占位符在您的 application.properties 文件中没有匹配的值:

Within your security configuration, you are using a property placeholder that do not have a matching value in your application.properties file:

@Configuration
@EnableWebSecurity
public class WebSecurity extends WebSecurityConfigurerAdapter {
    // ...

    private AuthenticationFilter getAuthenticationFilter() throws Exception {
        // ...
        authenticationFilter.setFilterProcessesUrl(env.getProperty("login.url.apth")); // there is no value attributed to the 'login.url.apth' property key
        return authenticationFilter;
    }

    // ...
}

如果 login.url.apth 仍然在其他地方定义(环境变量、系统属性或其他属性源),那么请确保您使用了适当的密钥,因为它似乎已经存在拼写错误login.url.pa[ap]th.

If the login.url.apth is still defined elsewhere (environment variables, system properties or other property source), then make sure you are using the appropriate key as it already seems there is a typo login.url.pa[ap]th.