
java
文章平均质量分 65
yuanwanchao
这个作者很懒,什么都没留下…
展开
-
springboot 使用yml配置文件自定义属性
springboot 中在application.yml文件里自定义属性值,配合@Value注解可以在代码中直接取到相应的值,如在application.yml中添加mqtt: serverURI: tcp://192.168.125.250:1939 topic: 在代码中可以用 @Value("${mqtt.topic}") private String topic ;原创 2018-02-07 14:37:08 · 29134 阅读 · 5 评论 -
springboot 整合thymeleaf 模板
thymeleaf 模板整合1.html页面放入static目录,或者templates目录2.html 要读取后端返回的数据,需要在html标签里添加xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" 如: xmlns="http://www.w3.org/1999/x原创 2018-02-07 14:39:30 · 302 阅读 · 0 评论