
springboot
昨夜的荒唐梦
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
springboot 扫描外部controller文件
背景:在同一个项目中分模块创建controller文件夹,在打包的时候只打包相对应的controller,而不是打包所有;除controller外其他文件都是共用的。 一、项目目录结构 从目录结构可以看到,当启动类 ManagerApplication 启动后是扫描不到 controller 类的,所以在启动类中需要配置 这样就能扫描到外部的 controller 文件了。 二、在打包的时候打包指定的文件 pom.xml配置 <plugin> <groupId>org.原创 2021-05-14 15:22:22 · 4099 阅读 · 0 评论 -
spring boot + jenkins 多环境配置
一、首先在项目中的配置 二、pom.xml配置 <profiles> <profile> <id>alpha</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> &l原创 2021-04-29 17:46:20 · 1372 阅读 · 0 评论 -
springboot2 + redis 缓存项目实战
一、关键配置 pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <version>2.4.4</version> </dependency> <dependency>原创 2021-04-19 21:28:01 · 144 阅读 · 0 评论 -
springboot + security 认证授权项目实战
一、关键配置 pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 二、认证授权加载流程 登录调用方法过程 1.前端发送登录请求 /user/login 认证过程 2.进入后端 LoginFilter 下的原创 2021-04-19 21:16:03 · 222 阅读 · 0 评论