当前位置:网站首页>0614~ holiday self study
0614~ holiday self study
2022-07-24 17:47:00 【Life is so hard】
The previous content reviewed today , Some details have been modified ;
matters needing attention :
1. Alibaba cloud uploads pictures , Front page does not show , The back-end path splicing is written one less / ;
2. Payment callback results are not displayed , The intranet penetration path has not been changed ;
3. To configure json Global time format , Import can be used ;
package cn.itsource.config.date;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.boot.jackson.JsonComponent;
import org.springframework.context.annotation.Bean;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.TimeZone;/**
* @description: Date and time global formatting
* @auth: wujiangbo
* @date: 2022-03-09 17:38
*/
@JsonComponent
public class LocalDateTimeSerializerConfig {@Value("${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}")
private String pattern;/**
* Date Type global time formatting
*/
@Bean
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilder() {
return builder -> {
TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");// Get time zone
DateFormat df = new SimpleDateFormat(pattern);// Set format template
df.setTimeZone(tz);
builder.failOnEmptyBeans(false)
.failOnUnknownProperties(false)
.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.dateFormat(df);
}; }/**
* LocalDate Type global time formatting
*/
@Bean
public LocalDateTimeSerializer localDateTimeDeserializer() {
return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(pattern));
}@Bean
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
return builder -> builder.serializerByType(LocalDateTime.class, localDateTimeDeserializer());
}
}
4. The payment function is done again , Familiar with the process ;
边栏推荐
- 实习报告1——人脸三维重建方法
- Can CSC open an account for domestic futures? Is it safe?
- 邻接表的定义和存储以及有向图无向图的邻接存储
- 使用matplotlib模拟线性回归
- Dry goods | three sub domain name collection tools worth collecting
- Detailed explanation of ansible automatic operation and maintenance (V) the setting and use of variables in ansible, the use of jinja2 template and the encryption control of ansible
- In the morning, Tencent took out 38K, which let me see the ceiling of the foundation
- SV casts and constants
- Df2net 3D model deployment
- Trends of semiconductor industry
猜你喜欢

hcip第三天

Interview assault 66: what is the difference between request forwarding and request redirection?

Definition and storage of adjacency table and adjacency storage of directed graph and undirected graph
![[wechat official account H5] authorization](/img/d1/2712f87e134c0b8b8fdeaab9e30492.png)
[wechat official account H5] authorization

The use and Simulation of character and string library functions in C language

Practical application cases of digital Twins - Smart Park

快速完成intelij idea的单元测试JUnit4设置

DF2NET三维模型部署

Openlayers: point aggregation effect
![[network security] analysis vulnerability of website Middleware](/img/3a/9c034c17d65348aa7c35a3dac2039c.png)
[network security] analysis vulnerability of website Middleware
随机推荐
DF2NET三维模型部署
Awk from getting started to getting into the ground (19) awk extensions make awk even stronger
Definition and storage of adjacency table and adjacency storage of directed graph and undirected graph
C语言中的字符与字符串库函数的使用以及模拟实现
Awk from entry to earth (17) awk multiline writing
The ability to detect movement in vivo and build a safe and reliable payment level "face brushing" experience
Colleges and universities have introduced 23 Philippine doctors with heavy funds, and the relevant departments have launched an investigation!
0701~放假总结
C language custom types - Enumeration
Blackmagic Fusion Studio 18
C language to achieve a static version of the address book
Pay close attention! List of the latest agenda of 2022 open atom open source Summit
SV强制类型转换和常数
还在从零开始搭建项目?这款升级版快速开发脚手架值得一试!
二维卷积——torch.nn.conv2d的使用
Js实现继承的六种方式
Array learning navigation
Detailed explanation of ansible automatic operation and maintenance (V) the setting and use of variables in ansible, the use of jinja2 template and the encryption control of ansible
Image information is displayed by browser: data:image/png; Base64, + image content
Eth POS 2.0 stacking test network pledge process