SpringSecurity Error creating bean with name ‘org.springframework.security.filterChains‘....

created at 02-23-2022 views: 24

Error analysis

In the error of the console log, it said Error creating bean with name 'org.springframework.security.filterChains', there was an error in creating the bean object, and the console Tomcat said Caused by: java.lang.IllegalArgumentException: 'pages/main. jsp' is not a valid forward URL error, I always thought it was a bean creation error when I solved it, and I only read the log error, so I haven't found a solution. Later, I carefully observed the console error, in Errors were found in the last few lines of the Tomcat log.

After seeing Tomcat's log, I realized that this is a simple error of wrong path. It is not a difficult bug to solve, but it is easier to find.

solution

The original configuration file in spring-security is shown in the figure:

spingsecurity

Modify the path in the configuration file to be correct:

after modification

Clear the cache, install the project, restart the server.

created at:02-23-2022
edited at: 02-23-2022: