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文件,把里面内容全部删除,再重新加载。
- 图片解析:
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具