会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
再见理想
Life is not what you have gained but what you have done!
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
55
56
57
58
59
60
61
62
63
···
232
下一页
2021年1月22日
【sprinb-boot】@ComponentScan 跳过扫描 excludeFilters
摘要: @ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = {Controller.class, RestController.class})) 前言 springboot
阅读全文
posted @ 2021-01-22 10:15 牧之丨
阅读(2031)
评论(0)
推荐(0)
2021年1月21日
spring boot 配置多个DispatcherServlet
摘要: 传统的web项目,只需要在web.xml里配置多个即可,并且支持多个url-pattern 在spring boot中,我们默认无需配置,系统会自动装配一个,感兴趣的可以看下源码 org.springframework.boot.autoconfigure.web.servlet.Dispatche
阅读全文
posted @ 2021-01-21 23:11 牧之丨
阅读(660)
评论(0)
推荐(0)
RepeatReadRequestWrapper
摘要: package cn.service.web.common.filter; import com.alibaba.fastjson.JSON; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUt
阅读全文
posted @ 2021-01-21 23:08 牧之丨
阅读(332)
评论(0)
推荐(0)
RestTemplate HttpClient详解及如何设置忽略SSL
摘要: @Configuration public class ScheduleRestConfigurer { @Bean public RestTemplate restTemplate() { RestTemplate restTemplate = new RestTemplate(httpReque
阅读全文
posted @ 2021-01-21 19:39 牧之丨
阅读(1133)
评论(0)
推荐(0)
Swagger注解-@ApiModel 和 @ApiModelProperty
摘要: @ApiModel 使用场景 在实体类上边使用,标记类时swagger的解析类 概述 提供有关swagger模型的其它信息,类将在操作中用作类型时自动内省 属性 属性名称数据类型默认值说明 value String 类名 为模型提供备用名称 description String “” 提供详细的类描
阅读全文
posted @ 2021-01-21 01:08 牧之丨
阅读(2479)
评论(0)
推荐(0)
SpringBoot 接收 单个String入参之解决方案
摘要: 场景: 在做接口时,有的时候,接口入参只需要一个参数,如果将一个参数封装成一个对象很麻烦,故有了以下方式: 思路: spring自带的参数解析器貌似是不具备这个能力的,所有自定义 方式方法: 1.定义一个注解 @Target(ElementType.PARAMETER) @Retention(Ret
阅读全文
posted @ 2021-01-21 00:57 牧之丨
阅读(693)
评论(0)
推荐(0)
2021年1月20日
spring boot添加 LocalDateTime 等 java8 时间类序列化和反序列化的支持
摘要: 由于项目将原有的 Date类型的字段改造为 LocalDate,LocalDateTime,LocalTime 类型, 发现 spring 对项目的时间格式无法自动转换,故需手动配置下。 在spring boot 中需在 maven 中引入 jsr-310 的支持 <dependency> <gro
阅读全文
posted @ 2021-01-20 21:48 牧之丨
阅读(1071)
评论(0)
推荐(0)
Mybatisplus实现MetaObjectHandler接口自动更新创建时间更新时间
摘要: 踩坑: 直接实现该接口,发现进入该类后的entity已经重新处理updateTime了,但是更新数据库的时候,却不带updateTime更新。 原因: 由于对该接口等认识不足导致。 解决方案: 实体类中需要添加注解:fill = FieldFill.INSERT_UPDATE 代码: /** * 更
阅读全文
posted @ 2021-01-20 20:16 牧之丨
阅读(707)
评论(0)
推荐(0)
关于SpringBoot 2.0,Pageable 无法注入,提示缺少默认构造方法的解决办法
摘要: https://www.cnblogs.com/sweetchildomine/p/9158882.html 在SpringBoot 2.0 以前,我们会配置以下类 * @date 2018/06/03 */ @Configuration public class WebMvcConfig exte
阅读全文
posted @ 2021-01-20 14:17 牧之丨
阅读(253)
评论(0)
推荐(0)
【转载】 SpringBoot声明式事务的简单运用
摘要: https://blog.csdn.net/justry_deng/article/details/80828180 关于事物的基本概念等这里就不介绍了。 Spring声明式事物的实现,有两种方式;第一种是配置xml,第二种是使用相关注解(这两种方式可详见《程序员成长笔记(一)》的相关章节)。Spr
阅读全文
posted @ 2021-01-20 09:59 牧之丨
阅读(159)
评论(0)
推荐(0)
上一页
1
···
55
56
57
58
59
60
61
62
63
···
232
下一页
公告