
Spring Boot / Spring Cloud
文章平均质量分 58
苏笛南风
这个作者很懒,什么都没留下…
展开
-
【spring boot/spring cloud踩坑记录】spring-boot-actuator的endpoint暗坑
最近在项目中使用spring-boot-admin监控应用,spring-boot版本为1.5.10.RELEASE,每次进行查看时,都会在目标应用处报错java.lang.IllegalArgumentException: EffectiveLevel must not be null at org.springframework.util.Assert.notNull(Assert.java...原创 2018-03-25 23:47:52 · 4660 阅读 · 0 评论 -
【spring boot/spring cloud踩坑记录】使用feign进行get请求时,对参数中的JSR310日期类进行处理
使用feign时,一般会编写一个接口类作为方法来进行调用。如String say(@RequestParam("time")LocalDateTime time);在处理jsr310规定的LocalDate、LocalDateTime时,feign默认的序列化方式是相当于进行.toString()。以LocalDateTime为例子,参数实际序列化后的样式是类似以下样式的201...原创 2018-04-27 15:22:35 · 2455 阅读 · 0 评论 -
【spring boot/spring cloud踩坑记录】使用spring-data-jpa时,对JSR310日期类的支持
spring-boot在使用spring-data-jpa时,如果需要对LocalDate、LocalDateTime等在jsr310中定义的新日期类进行支持,需要在启动类或带有@Configuration的类上加入以下注解:@EntityScan( basePackageClasses = {Application.class, Jsr310JpaConverters.cl...原创 2018-05-15 00:46:13 · 1089 阅读 · 0 评论 -
【Spring Boot】Spring Boot 2.x + Spring Security OAuth2 2.3.3 出现 bad client credentials 错误的踩坑记录
环境:spring boot 2.0.4.RELEASEspring security oauth 2.3.3.RELEASEOAuth2的配置@Configuration@EnableAuthorizationServerpublic class OAuth2AuthorizationConfig extends AuthorizationServerConfigurerA...原创 2018-08-25 21:55:28 · 31469 阅读 · 10 评论 -
spring boot 2.x 使用cache的一点踩坑想法
最近项目中需要用到openfeign,即spring-cloud中的一个组件,前身为feign由于某些配置参数会进行频繁请求,为了减轻api producer的压力,需要在方法上加一层cache最初考虑使用ehcache3,但经测试发现存在一个比较麻烦的问题,ehcache3要求被缓存的目标需要实现java.io.Serializable这个目前已经比较少用(通常使用json)的...原创 2019-03-25 14:38:33 · 856 阅读 · 0 评论