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 2022-11-05 16:31  陈嘻嘻-  阅读(586)  评论(0)    收藏  举报

导航