![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
csdn_guang
学习别人,总结自己。
展开
-
Springboot使用策略模式实现积分任务
1,注解类,主要用来区分不同用户请求使用何种策略实现类(存在多个url对应同一策略实现类的情况)/** * 用户积分任务策略类型 */@Target(ElementType.TYPE)@Retention(RetentionPolicy.RUNTIME)@Documented@Servicepublic @interface UserIntegralTaskStrategyType { /** * 用户请求URI * @return */原创 2021-05-18 19:08:49 · 905 阅读 · 0 评论 -
java8的LocalDateTime在SpringBoot中的json序列化问题
一、使用SpringBoot内置的 jackson 来完成JSON的序列化和反序列化操作1,对前端传入的日期进行格式化@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")private LocalDateTime startTime;2,将LocalDateTime字段以指定格式化日期的方式返回给前端@JsonFormat(shap...原创 2019-11-19 15:01:45 · 5777 阅读 · 0 评论