框架
学习&复习框架
strivefeng
努力不一定成功,颓废必定失败!
展开
-
spring boot多数据源
spring boot多数据源import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.Target;import static java.lang.annotation.ElementType.METHOD;import static java.lang.annotation.RetentionPolicy.RUNTIME;/** *原创 2021-03-01 10:52:16 · 172 阅读 · 1 评论 -
boot中配置定时问题开启关闭
boot中配置定时问题开启关闭需要的配置@Scheduled(cron = "0/50 * * * * ?")//50秒执行一次@ConditionalOnProperty(prefix = "Scheduled", name = "enabled", havingValue = "true") Scheduled.enabled=true //对应prefix 对应name 对应havingValue 如果匹配不上就不开启匹配上就开启...原创 2021-01-12 10:33:10 · 283 阅读 · 0 评论 -
mybatis自连接
mybatis中的自连接实体 private int id; private String newsMenuName; private int pid; private List<PortalNewsMenu> lists;controller @Resource PortalNewsMenuDao portalNewsMenuDao; @GetMapping("aaa") public void getCatByPid(){ int p原创 2020-12-11 15:36:15 · 630 阅读 · 0 评论 -
Spirng Boot 中前后台跨域问题
Spirng Boot 中前后台跨域问题@Configuration/**@Configuration用于定义配置类,可替换xml配置文件,被注解的类内部包含有一个或多个被@Bean注解的方法,这些方法将会被AnnotationConfigApplicationContext或AnnotationConfigWebApplicationContext类进行扫描,并用于构建bean定义,初始化Spring容器。@Configuration的第二个作用是可以作为配置类,和@Component的作用一样原创 2020-10-12 14:25:28 · 74 阅读 · 0 评论 -
boot项目中上传&下载
boot项目中上传&下载<!-- pom依赖 上传下载--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>@Po原创 2020-11-09 16:30:57 · 114 阅读 · 0 评论 -
boot项目中的yml文件
boot项目中的yml文件server: port: 8090spring: #boot项目中时间戳转yyyy-MM-dd 需要在实体字段上加上 @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") jackson: date-format: yyyy-MM-dd time-zone: GMT+8 servlet: multipart: #上传一个文件最大值 默认是1MB ma原创 2020-11-02 14:27:17 · 142 阅读 · 0 评论 -
boot分页-pagehelper+模糊查询+批量修改
pom依赖 <!--分页插件 如果报错可以更换版本--> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.5 </v原创 2020-08-26 22:45:11 · 548 阅读 · 0 评论 -
spring-boot集成日志
spring-boot集成日志在pom文件中添加以下依赖 <!-- 日志 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency&g原创 2020-08-17 14:02:39 · 117 阅读 · 0 评论