随笔分类 - springBoot
摘要:1、SpringBoot项目中Controller的validator做参数校验不生效的问题 解决: springboot 2.3之前的集成在spring-boot-starter-web里了,所以不需要额外引入包 springboot 2.3之后需要引入 spring-boot-starter-v
阅读全文
摘要:https://segmentfault.com/a/1190000024467109 一个后端接口大致分为四个部分组成:接口地址(url)、接口请求方式(get、post等)、请求数据(request)、响应数据(response)。如何构建这几个部分每个公司要求都不同,没有什么“一定是最好的”标
阅读全文
摘要:https://blog.csdn.net/typa01_kk/article/details/76696618
阅读全文
摘要:一、注解(annotations)列表 1、@SpringBootApplication 包含了@ComponentScan、@Configuration和@EnableAutoConfiguration注解。其中@ComponentScan让Spring Boot扫描到Configuration类
阅读全文
摘要:过本文你将学到: Component Scan是什么? 为什么ComponentScan很重要? 项目中Spring Boot会对哪些包自动执行扫描(Component Scan)? 如何利用Spring Boot定义扫描范围? 项目启动时关于Component Scan的常见报错 @Compone
阅读全文
摘要:springboot中的常用注解有:@SpringBootApplication、@Repository、@Service、@RestController、@ResponseBody、@Component、@ComponentScan等等。下面本篇文章就来给大家介绍一下,希望对大家有所帮助。 1、@
阅读全文
摘要:spring网站:https://start.spring.io/ 下载包后解压,就是一个空的sprigboot项目
阅读全文
摘要:pom.xml 引入redis 开启缓存 application.properties 配置文件 RedisService 测试用的Controller
阅读全文