![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
千羽12138
这个作者很懒,什么都没留下…
展开
-
Springboot动态代理注解参数校验
通用 controller: @PostMapping("/testVal") public Req testVal(@RequestBody @Validated Req req){ return req; } Req: public class Req { @NotNull(message = "name!") private String name; @DecimalMax(value = "10",message = "not")原创 2020-05-25 12:10:51 · 734 阅读 · 0 评论 -
springboot使用自定义注解注入参数值
需求:使用自定义注解,获得请求头中的字段,映射进入handler参数。 1、自定义注解 package com.example.demo.anno; import java.lang.annotation.*; /** * @author shi * @created 2019/11/28 */ @Documented @Target({ElementType.PARAMETER}) @...原创 2019-11-28 14:37:07 · 5038 阅读 · 0 评论 -
Springboot全局异常处理Demo
通用信息返回json类 package com.example.demo.exception; /** * @author shi * @created 2019/11/15 */ public class GeneralResponse { private Integer code; private String msg; public Integer...原创 2019-11-15 18:02:39 · 521 阅读 · 0 评论 -
springboot配置
打印sql日志 logging.level.com.example.springbootcache.mapper=debug 开启驼峰命名法 mybatis: configuration: map-underscore-to-camel-case: true原创 2019-10-17 21:40:46 · 113 阅读 · 0 评论 -
spring boot初学的坑
使用@ConfigurationProperties加载配置文件的类idea提示 spring boot Configuration Annotation Proessor not found in classpath 官方解决:加入依赖 <dependency> <groupId>org.springframework....原创 2019-01-02 17:09:34 · 114 阅读 · 0 评论