
springboot
一桁一树
这个作者很懒,什么都没留下…
展开
-
Spring Boot 2.x 之自定义自动配置类
自定义自动配置类: 1.pom.xml添加自定义配置文依赖 2.创建一个自定义配置类 3.创建一个config类用注解激活自定义配置类,并@ConditionalOnMissingBean检查容器中是否有此Bean 4.在application.properties配置自定义配置类的属性 5.访问路径,日志信息输出配置属性值 6.测试结果 在我们了解此配置之后对springboot的源码了解有非常...原创 2019-11-16 23:56:39 · 1141 阅读 · 0 评论 -
springboot处理时间格式
1.表单提交时间格式配置在application.properties中配置下springMvc即可。 #表单提交的时候处理提交时间格式不对报错的问题,springboot提交默认是’/'格式 spring.mvc.date-format=yyyy-MM-dd HH:mm 2.thymeleaf模板引擎对Model中的数据进行格式化方法: ${#dates.format(date, ‘dd/MMM...原创 2019-11-16 14:13:59 · 362 阅读 · 0 评论