1.maven使用bulid时出现 invalid LOC header (bad signature)
解决方法:把对应的包删掉 重新注入
2.maven导入项目时pom报错 Multiple annotations found at this line: - Failure to transfer commons-codec:commons-codec:jar:1.10...
解决办法:update project 勾选Force Update of Snapshots/Release
3.mysql高版本与低版本驱动不兼容问题:
例一:时区不对 报错信息如下:
The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
解决方法:
在DOS界面进入mysql (输入 mysql -u root -p),输入密码进入界面。输入如下代码:show variables like '%time_zone%';
之后对time_zone进行修改,代码如下:set global time_zone = '+8:00'
显示query ok 即为可用。再次运行即可。
例二:缺少高版本的必要属性 或 由于属性值的修改导致值不规范,下面为其中一种
The connection property 'zeroDateTimeBehavior' acceptable values are: 'CONVERT_TO_NULL', 'EXCEPTION' or 'ROUND'. The value 'convertToNull' is not acceptable.
解决办法:找到对应版本中值得对应格式,更新字段即可。如旧版本中zeroDateTimeBehavior的格式为convertToNull,新版本中(8.0.11)为CONVERT_TO_NULL。
例三:高版本中移除或过时导致找不到对应的属性,例子如下,情况应该也不唯一
java.sql.SQLException: Unknown system variable 'query_cache_size'
解决办法:如果是maven工程,可以找到对应的dependency,将mysql的版本调高即可,在上传代码时记得回调!!!
4.启动Spring Boot时,,抛出异常信息如下:
Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package
分析原因:Spring Boot启动时,抛出“** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.”警告信息,这是由于application.Java文件不能直接放在main/java文件夹下,必须要建一个包把它放进去。
解决办法:Spring Boot在写启动类的时候如果不使用@ComponentScan指明对象扫描范围,默认指扫描当前启动类所在的包里的对象,如果当前启动类没有包,则在启动时会抛出上述警告信息,导致项目出错。
13万+

被折叠的 条评论
为什么被折叠?



