随笔分类 -  springboot 相关

通过Fegin远程调用 ,返回JPA Page 对象报错
摘要:大概意思是:不能构造实例org.springframework.data.domain.Page :抽象类型要么需要映射到具体类型,要么有自定义反序列化器,要么用额外的类型信息进行实例化 。 解释下啊,第一种办法就是page是一个接口,反序列化需要配置映射到具体的类型在Page类上面加@JsonDe 阅读全文
posted @ 2018-07-09 18:43 WenQ001 阅读(3296) 评论(4) 推荐(2)
springboot jpa 批量保存数据--EntityManager和 JpaRepository
摘要:1: 项目里面使用springboo-boot-start-data-jpa操作数据库,通过源码,在repository上继承JpaRepository 可以实现保存操作,其中源码接口为: 从源码接口可以看出,其中已经提供批量保存接口,继续跟进实现类源码: 从源码我们看出遍历集合,调用save()方 阅读全文
posted @ 2018-07-04 18:54 WenQ001 阅读(12795) 评论(0) 推荐(3)
springboot--常用注解--@EnableConfigurationProperties
摘要:后面补 阅读全文
posted @ 2018-07-04 07:53 WenQ001 阅读(183) 评论(0) 推荐(0)
springboot--常用注解--@ConfigurationProperties
摘要:内容后面补 阅读全文
posted @ 2018-07-04 07:51 WenQ001 阅读(283) 评论(0) 推荐(0)
springboot--常用注解--@configration、@Bean
摘要:@Configuration底层是含有@Component ,所以@Configuration 具有和 @Component 的作用。 @Configuration可理解为用spring的时候xml里面的<beans>标签。 相当于: @Bean可理解为用spring的时候xml里面的<bean>标 阅读全文
posted @ 2018-07-04 07:50 WenQ001 阅读(42887) 评论(2) 推荐(2)
hystrix -hystrixCommand配置介绍
摘要:public @interface HystrixCommand { // HystrixCommand 命令所属的组的名称:默认注解方法类的名称 String groupKey() default ""; // HystrixCommand 命令的key值,默认值为注解方法的名称 ... 阅读全文
posted @ 2018-06-11 16:16 WenQ001 阅读(9663) 评论(0) 推荐(0)