SpringBoot报错解决

1-问题:2022-11-05 16:25:09.334 ERROR 18989 --- [ main] o.s.b.d.LoggingFailureAnalys

解决:在java的入口把@SpringBootApplication改成@SpringBootApplication(exclude={DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})

2-问题:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-11-05 17:12:20.877 ERROR 19169 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'helloController': Unsatisfied dependency expressed through field 'address'; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "beijing"

解决:这个地方的报错原因是:我想引用ymal文件里面的值,但是我把String类型,写成int。所以报错了,其实报错里面帮我都写到了Failed to convert value of type 'java.lang.String' to required type 'int'

3-问题:

在(配置)配置文件的时候,没有(高亮)而且(显示Unused property)

解决:在File>>setting中搜索Inspections,将Unused Property后面的复选框勾选取消掉。

4-问题:

在使用springboot配置MyBatis的时候,报错java.lang.RuntimeException: Cannot reconnect.

解决:

在idea里面找到idea.log文件,把里面内容全部删除,再重新加载。
  • 图片解析:

把这个idea.log删除再重新加载就可以了

posted on   陈嘻嘻-  阅读(547)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示