The solution to the inconsistency between the dependencies of the spring boot maven project in idea and the pom.xml file

        Today, I created a spring boot project with idea, which includes spring security. In the case that both the pom file and the project dependencies have security dependencies, the access link to the project will jump to the verification login page for entering the account password, code and jump. as follows:

 

In order to verify the role of security, comment out the security in the pom file, as follows:

 

After restarting, it still jumps to the login page. After investigation, the dependencies introduced by the project are inconsistent with those in the pom file.

 At this time, the maven clean operation of the idea needs to be performed. The method is as follows:



 After the dependencies are consistent with those in the pom file, restart the project and you will no longer be redirected to the login page. (If it fails to start here,

选择 File -> Project Structure->Modules->Dependencies

Find the scope of the jar package of tomcat-embed-core is provided by default, and change it to compile. )
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326012760&siteId=291194637