When logging into the spring-security application, it displays the following message:

{"timestamp":1464679377206,"status":999,"error":"None","message":"No message available"} 

and redirects to the error-page in the application deployed in wildfly, there is no such problem when running spring-boot. With that, if you then drive the correct address with your hands, everything works correctly. Application launch class:

 @SpringBootApplication public class Application extends SpringBootServletInitializer { public static void main(String[] args) throws Exception { SpringApplication.run(Application.class, args); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(applicationClass); } private static Class<Application> applicationClass = Application.class; } 

Thymeleaf login form

  <div sec:authorize="isAnonymous()" id="anonymous-navbar" class="navbar-collapse collapse"> <form th:action="@{/login}" method="post" class="navbar-form navbar-right"> <div class="form-group"> <input type="text" name="username" placeholder="User" class="form-control" /> </div> <div class="form-group"> <input type="password" name="password" placeholder="Password" class="form-control" /> </div> <button type="submit" class="btn btn-success" value="login">Log in</button> </form> 

Security configuration

 @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired UserService userService; @Autowired @Qualifier("userServiceImpl") UserDetailsService userDetailsService; @Autowired public void configureGlobalSecurity(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService); } @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/", "/home", "/signup", "/add_person").permitAll() .anyRequest().authenticated() .and() .formLogin() .loginPage("/login") .permitAll() .and() .logout() .permitAll(); } @Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers("/images/**"); } } 

UPD: debug FirewalledRequest [HttpServletRequestImpl [GET / PersonalFinance / error]] Looks like some kind of firewall error, although I'm not sure if this is root braid. How to disable firewall on debian?

Logi looked - there is nothing.

debug

Found a couple of questions on this topic at eng.so:

But none of the answers presented there solved the problem.

  • one
    Debag tried to watch? Any throws out? - enzo
  • Podebagil was a little bit, but I don’t even know where to dig in, there are no exceptions in the classes in question - cadmy
  • one
    Here is the class that handles your exception. You have given little data, so the reason is difficult to give. A lot of things can be. For example, maybe you have embedded tomcat in the classpath. I repeat, look at the logs in the DEBUG mode, find the line on which you are thrown onto this message, and see what precedes it. - enzo
  • embedded tomcat thus exclude <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> - cadmy

1 answer 1

The error appeared due to the fact that the folder with pictures was not included in the project, but was registered in the spring-security configuration. Accordingly, this folder did not find the spring and cursed.