- 博客(5)
- 收藏
- 关注
原创 记一次关于Spring Batch序列化异常解决思路:No serializer found for class com.XXX.XXX$YYY and no properties disc
记一次关于Spring Batch序列化异常:No serializer found for class com.XXX.XXX$YYY and no properties discovered to create BeanSerializer解决思路
2024-02-01 16:20:01
819
1
原创 Eureka<一>:SpringCloud Eureka集群的搭建
快速搭建Eureka集群服务 **使用步骤 1.导入依赖 新建一个spring Initiaizr工程或Maven工程,直接将以下坐标导入即可,加上与springCloud相关的版本 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
2020-09-15 02:39:10
153
原创 @PostConstruct springBoot 服务启动时自动(预)加载公共方法/内容
有的时候我们需要在服务启动的时,系统自动从数据库中读取数据,加载近服务。以便在正式提供服务的时候不需要再次因读取数据加载而影响调用服务的耗时。 @PostConstruct public void init() {…} ...
2020-03-20 17:44:35
612
原创 JSON的格式转换
1、包名:com.alibaba.fastjson.JSON 1、日期格式转换: WriteDateUseDateFormat:全局修改日期格式,默认为false。代码如下: JSON.DEFFAULT_DATE_FORMAT = “yyyy-MM-dd”; String objStr = JSON.toJSONString(obj, SerializerFeature.WriteDateUseD...
2020-03-20 17:36:06
253
原创 distinct与distinct 的使用
distinct:sql中返回的的字段只能是distinct的那个字段: select distinct id from student; 如果在查询中除了需要去重返回多个字段,需要用distinct on,如果只用destinct,sql语句会报错 : select distinct on(id) id, name, age from student; 注意:以上写法会根据id重复的数据随机返回...
2020-03-19 18:11:59
786
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅