idea 运行spring boot 出现错误处理
2018-01-18 21:13
459 查看
1.如果idea 运行spring boot 出现以下错误
Error startingApplicationContext. To display the auto-configuration report re-run yourapplication with 'debug' enabled.
[ERROR]21:28:37.177 [main] o.s.b.d.LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILEDTO START
***************************
Description:
Constructor inorg.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfigurationrequired a single bean, but 2 were found:
- mbeanExporter: defined by method 'mbeanExporter'in class path resource[org/springframework/context/annotation/MBeanExportConfiguration.class]
- endpointMBeanExporter: defined bymethod 'endpointMBeanExporter' in class path resource[org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportAutoConfiguration.class]
Action:
Consider markingone of the beans as @Primary, updating the consumer to accept multiple beans,or using @Qualifier to identify the bean that should be consumed
Process finishedwith exit code 1
解决方法如下
去掉
就解决了。
2.spring boot 在使用mybatis 中
出现在以下错误
业务类service层中用@service @Autowired 把mapper注入,实际运行时执行到该service报错,报mapper没有注入
跟IDEA得编译有关。
解决方式如下:
把error改为警告就好了
Error startingApplicationContext. To display the auto-configuration report re-run yourapplication with 'debug' enabled.
[ERROR]21:28:37.177 [main] o.s.b.d.LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILEDTO START
***************************
Description:
Constructor inorg.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfigurationrequired a single bean, but 2 were found:
- mbeanExporter: defined by method 'mbeanExporter'in class path resource[org/springframework/context/annotation/MBeanExportConfiguration.class]
- endpointMBeanExporter: defined bymethod 'endpointMBeanExporter' in class path resource[org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportAutoConfiguration.class]
Action:
Consider markingone of the beans as @Primary, updating the consumer to accept multiple beans,or using @Qualifier to identify the bean that should be consumed
Process finishedwith exit code 1
解决方法如下
去掉
就解决了。
2.spring boot 在使用mybatis 中
出现在以下错误
业务类service层中用@service @Autowired 把mapper注入,实际运行时执行到该service报错,报mapper没有注入
跟IDEA得编译有关。
解决方式如下:
把error改为警告就好了
相关文章推荐
- 使用spring tool suite(STS)工具创建spring boot项目和出现错误后的处理
- VS Code打开使用IDEA搭建的Spring Boot项目运行提示"snakeyaml was not found on the classpath"错误
- 使用IDEA创建springboot项目时,出现错误Cannot download 'https://start.spring.io': connect timed out
- Idea - Spring Boot - MVC 出现This application has no explicit mapping for /error, so you are seeing th
- IDEA Gradle 打包 Spring Boot 1.5x 可运行的jar文件流程
- spring boot之统一错误异常处理
- Spring Boot错误处理 (四)
- springboot使用之四:错误页面404处理建议
- spring boot 错误处理之深度历险
- Spring Boot Web应用开发 错误处理
- springboot->使用messagesSourcec处理字段验证抛出错误
- maven在Idea建立工程,运行出现Server IPC version 9 cannot communicate with client version 4错误
- 利用命令部署springBoot项目出现ERROR] No plugin found for prefix ‘spring-boot’ in the current的错误
- maven spring restful 以json返回时,如果出现406错误该如何处理
- Spring Boot 经常出现的错误:com.fasterxml.jackson.databind.ObjectWriter.forType
- spring boot 下 500 404 错误页面处理
- 【spring boot】6.idea下springboot打包成jar包和war包,并且可以在外部tomcat下运行访问到
- IDEA里运行代码时出现Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUnit4.class错误的解决办法(图文详解)
- spring boot 错误处理
- Spring Boot基本配置和常见的运行时错误以及解决