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.
The original configuration file in spring-security is shown in the figure:
Modify the path in the configuration file to be correct:
Clear the cache, install the project, restart the server.