
springboot
晦暗天明
java后台程序员
展开
-
@ConfigurationProperties取yml文件值为null的bug
今天整合springboot时候,在person类中用@ConfigurationProperties(prefix = "testPerson")取application-dev.yml文件的值时,发现取出来的值都是空值,也没报错。而在HelloController类中用用@Value("testValue")取值却成功的从application-dev.yml文件中取出来了。ap...原创 2019-04-26 21:40:32 · 11772 阅读 · 1 评论 -
springboot+mybatis+vue经验总结
整合了几天springboot+mybatis+vue,踩了很多坑,先记下来。首先是springboot的版本很重要,一开始我用springboot2.1就总是启动失败,我换成springboot2.0就好了,我也不知道为什么。springboot的配置倒是的确比较简单,按网上那些来就行了。然后是mybatis逆向生成,我遇见个很奇葩的问题,如果生成的model里面有xxxEx...原创 2019-05-11 04:14:52 · 2758 阅读 · 1 评论 -
springboot+thymeleaf无后缀访问static下前端静态HTML报错总结
今天使用springboot+thymeleaf访问前端静态HTML时候,无论Controller里怎么写,lcalhost:8080/login都无法访问到static下的HTML页面,我反复确定Controller代码没问题,于是怀疑可能是配置出问题了。pom.xml里<dependency> <groupId>org.springframework....原创 2019-05-13 03:38:23 · 2212 阅读 · 1 评论