2019年6月10日

springboot 自定义 formatter 注解

摘要: 我们在开发时会用到 @DateTimeFormat 这个注解。 对于从前台接收时间日期格式 很方便。 但如果前台传来的是 "是" “否” “有” "无" 这样的中文时,想要转成boolean 类型时,没有对应的注解,下面我们自己来实现这个注解。 本例基于 springboot 2.x jdk1.8 阅读全文

posted @ 2019-06-10 16:06 .carl 阅读(1787) 评论(2) 推荐(0) 编辑

导航