在写springboot的时候,运行的时候出现o.s.b.d.LoggingFailureAnalysisReporter报错
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call the method org.springframework.security.provisioning.InMemoryUserDetailsManager.<init>([Lorg/springframework/security/core/userdetails/UserDetails;)V but it does not exist. Its class, org.springframework.security.provisioning.InMemoryUserDetailsManager, is available from the following locations:
jar:file:/C:/Users/lqq/.m2/repository/org/springframework/security/spring-security-core/4.2.2.RELEASE/spring-security-core-4.2.2.RELEASE.jar!/org/springframework/security/provisioning/InMemoryUserDetailsManager.class
It was loaded from the following location:
file:/C:/Users/lqq/.m2/repository/org/springframework/security/spring-security-core/4.2.2.RELEASE/spring-security-core-4.2.2.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.security.provisioning.InMemoryUserDetailsManager
Disconnected from the target VM, address: '127.0.0.1:27204', transport: 'socket'
Process finished with exit code 0

jar报错,在pom.xml去掉spring-security-core
去掉之后还是出现这个错误:o.s.b.d.LoggingFailureAnalysisReporter
在多方查证后,需要在启动类加上@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})启动以后就可以正常运行。
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})