
springboot
唱响星河
内向--内心向往第一
展开
-
maven项目引入外部jar包并打进war包
<!-- 引入外部jar包 --> <dependency> <groupId>com</groupId> <artifactId>paradox</artifactId> <version>1.4.1</version> <scope>system</scope>&l...原创 2020-11-25 09:01:20 · 581 阅读 · 2 评论 -
springboot连接oracle时报错:不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK
java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:233) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThi...原创 2020-07-23 10:50:03 · 4450 阅读 · 3 评论 -
Could not autowire No beans of BookMapper type found
在springboot中controller调用mapper文件后报错@AutowiredBookMapper1 bookMapper1;正常应该是给BookMapper1多加一个注解@Repository1、@Service用于标注业务层组件2、@Controller用于标注控制层组件(如struts中的action)3、@Repository用于标注数据访问组件,即DAO组件.4、@Component泛指组件,当组件不好归类的时候,我们可以使用这个注解进行标注。...原创 2020-06-07 19:03:26 · 412 阅读 · 0 评论 -
springboot连接mysql时报错:The server time zone value 乱码 is unrecognized or represents more than
springboot连接mysql时发生错误:java.sql.SQLException:Theservertimezonevalue'йʱ'isunrecognizedorrepresentsmorethanonetimezone.YoumustconfigureeithertheserverorJDBCdriver(viathe'serverTimezone'configurationproperty)touseam...原创 2020-06-01 14:57:59 · 358 阅读 · 0 评论 -
springboot使用fastjson转换器时返回中文出现乱码
springboot使用fastjson时出现中文乱码情况在代码中加入@Bean FastJsonHttpMessageConverter faseJsonHttpMessageConverter() { FastJsonHttpMessageConverter converter=new FastJsonHttpMessageConverter(); FastJsonConfig config=new FastJsonConfig(); co...原创 2020-05-29 09:14:49 · 911 阅读 · 0 评论 -
解决springboot的pom.xml文件第一行报错问题
转自:https://blog.youkuaiyun.com/u010947534/article/details/93743582问题:Eclipse导入maven项目时,或者新建一个springboot项目时,pom.xml文件第一行报错,没有错误信息提示,就一个Unknown,但是项目可以正常运行。 如下图:解决方案:方案1.看有的博客说是由于网络原因,导致有的包没有下载,在有网络的情况下,勾选强制更新。但是我的问题依旧没有得到解决。方案2:(以下方案亲测可用)原因:由于2.1.5.R转载 2020-05-29 08:52:34 · 1460 阅读 · 0 评论 -
解决eclipse创建spring boot项目加载不到application.properties配置文件的问题
转自:https://blog.youkuaiyun.com/WTunique/article/details/77877449我在创建一个spring boot项目的时候遇到了无法读取配置文件的问题,举个很小的例子。在eclipse中新创建了一个spring boot项目,其目录如下我们将application.properties修改一下,改一下端口号:但是当启动的时候端口号却显示使用了8080端口,没有读取到配置文件信息:我在网上找了一些资料,有...转载 2020-05-28 17:50:08 · 2162 阅读 · 0 评论 -
springboot加载配置文件properties时出现汉字乱码
@PropertySource(value="classpath:resources/book.properties",encoding = "UTF-8")利用encoding转换为UTF-8就可以了原创 2020-05-28 14:51:28 · 179 阅读 · 0 评论