Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2023-05-15T22:28:42.434+08:00 ERROR 9660 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: org.springframework.boot.autoconfigure.security.servlet.SpringBootWebSecurityConfiguration$SecurityFilterChainConfiguration.defaultSecurityFilterChain(SpringBootWebSecurityConfiguration.java:56) The following method did not exist: 'org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer$AuthorizationManagerRequestMatcherRegistry org.springframework.security.config.annotation.web.builders.HttpSecurity.authorizeHttpRequests()' The calling method's class, org.springframework.boot.autoconfigure.security.servlet.SpringBootWebSecurityConfiguration$SecurityFilterChainConfiguration, was loaded from the following location: jar:file:/C:/Users/86152/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.0.6/spring-boot-autoconfigure-3.0.6.jar!/org/springframework/boot/autoconfigure/security/servlet/SpringBootWebSecurityConfiguration$SecurityFilterChainConfiguration.class The called method's class, org.springframework.security.config.annotation.web.builders.HttpSecurity, is available from the following locations: jar:file:/C:/Users/86152/.m2/repository/org/springframework/security/spring-security-config/5.5.0/spring-security-config-5.5.0.jar!/org/springframework/security/config/annotation/web/builders/HttpSecurity.class The called method's class hierarchy was loaded from the following locations: org.springframework.security.config.annotation.web.builders.HttpSecurity: file:/C:/Users/86152/.m2/repository/org/springframework/security/spring-security-config/5.5.0/spring-security-config-5.5.0.jar org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder: file:/C:/Users/86152/.m2/repository/org/springframework/security/spring-security-config/5.5.0/spring-security-config-5.5.0.jar org.springframework.security.config.annotation.AbstractSecurityBuilder: file:/C:/Users/86152/.m2/repository/org/springframework/security/spring-security-config/5.5.0/spring-security-config-5.5.0.jar
时间: 2023-06-24 17:03:05 浏览: 534
这个错误信息看起来是 Spring Boot 应用启动失败了,可能是因为在 Spring Security 的配置中调用了一个不存在的方法导致的。建议你重新运行应用并开启调试模式,查看详细的错误信息。同时,你也可以检查一下应用中的 Spring Security 配置,确认是否存在调用了不存在的方法的情况。
相关问题
Error starting ApplicationContext. To display the condition evaluation report re-run your application with debug enabled.
引用中的报错信息是说在创建名为'tbUserDao'的bean时出错,原因是缺少'sqlSessionFactory'或'sqlSessionTemplate'这两个必要的属性。引用中提到了解决这个问题的方法,检查项目依赖是否正确匹配,并确保mybatis的版本与项目的版本兼容。如果依赖不匹配,可以尝试将mybatis的版本降低,并清空缓存后重启项目。引用则是关于Spring的applicationContext.xml配置文件的详解。根据您提供的问题,您可能需要重新运行应用程序并启用debug模式以显示条件评估报告来解决“Error starting ApplicationContext”的问题。
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled
你遇到的问题是"Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled"。这个错误通常在启动Spring应用程序时出现,是由于应用程序的依赖关系配置错误或配置文件错误引起的。根据你提供的引用内容,有几个解决方法可以尝试。
首先,可以检查你的依赖关系配置。错误信息中提到的"Error creating bean with name 'tbUserDao'"表明在创建"tbUserDao" Bean时出错。可能是因为缺少必需的属性"sqlSessionFactory"或"sqlSessionTemplate"导致的。你可以查看你的代码和配置文件,确保这些属性已正确配置。
其次,根据引用的内容,你还可以尝试降低MyBatis的版本来解决问题。如果你的Spring Boot项目使用了MyBatis,并且在版本更新后出现了问题,降低MyBatis版本可能有助于解决依赖关系不匹配的问题。
最后,根据引用的内容,你可以仔细检查你的Spring应用程序的applicationContext.xml配置文件。确保配置文件中的所有bean定义和依赖关系都正确,并且没有语法错误。
综上所述,你可以通过检查依赖关系配置,降低MyBatis版本或检查配置文件来解决"Error starting ApplicationContext"的问题。记得重新运行应用程序时启用debug模式以显示条件评估报告。
阅读全文