![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring boot
light_catcher
这个作者很懒,什么都没留下…
展开
-
spring boot 打包后乱码问题
问题:设置了全局字符集格式为UTF-8,IDE启动没有任何乱码,但是打包后放到Windows下启动运行就出现了乱码解决方式:不是程序的问题,DOS面板启动命令改为:java -Dfile.encoding=utf-8 -jar target/xxxxxxx.jar完美收工![日常蠢哭系列]...原创 2018-10-30 18:45:15 · 4619 阅读 · 6 评论 -
【Spring】报错java.lang.NoSuchMethodError: org.springframework.util.Assert.state
报这个错,一般是因为有jar包冲突了,删掉一个就好了,我的是因为多添加了一个junit的test包,排查完毕,继续搬砖!原创 2018-12-02 20:09:45 · 9905 阅读 · 1 评论 -
【spring boot】读取自定义properties资源文件
项目结构如图所示,自定义的配置文件放在工程目录下,entry中是properties的注入实体类新建一个实体类,用于注入配置文件的参数:@Component@PropertySource("classpath:MyProperties.properties")public class MyProperties{ @Value("${myfield}") pri...原创 2018-12-15 00:29:49 · 1028 阅读 · 0 评论