Error:(3, 32) java: 无法访问org.springframework.boot.SpringApplication 错误的类文件: /D:/debug/repository/org/springframework/boot/spring-boot/3.0.2/spring-boot-3.0.2.jar!/org/springframework/boot/SpringApplication.class 类文件具有错误的版本 61.0, 应为 52.0 请删除该文件或确保该文件位于正确的类路径子目录中。
时间: 2023-03-10 10:04:26 浏览: 288
看起来你出现了一个版本错误,你可以尝试删除该文件,然后重新下载 org.springframework.boot.SpringApplication 的正确版本,或者确保该文件位于正确的类路径子目录中。
相关问题
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
这个错误信息看起来是 Spring Boot 应用启动失败了,可能是因为在 Spring Security 的配置中调用了一个不存在的方法导致的。建议你重新运行应用并开启调试模式,查看详细的错误信息。同时,你也可以检查一下应用中的 Spring Security 配置,确认是否存在调用了不存在的方法的情况。
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2023-06-02 14:17:49 ERROR main org.springframework.boot.SpringApplication Application run failed org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.mt.mtip.SpmsApplication]; nested exception is java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration
这看起来像是一个Spring Boot应用程序的启动错误,其中一个配置类(com.mt.mtip.SpmsApplication)中的导入候选项处理失败。异常信息表明处理消息源自动配置时出现错误。可能的原因是配置不正确或依赖项缺失。您可以启用debug模式并查看详细的条件报告以获取更多信息,以帮助您诊断问题。
阅读全文