Spring boot 传递JSON 数据格式 为NULL 格式化。数据库配置
程序员文章站
2022-07-14 23:44:35
...
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
username: root
password: 123456
url: jdbc:mysql://192.168.1.11/sell?characterEncoding=utf-8&useSSL=false
jpa:
show-sql: true
# 全局格式化 json 格式#
jackson:
default-property-inclusion: non_null
server:
servlet:
context-path: /sell
#logging:
# pattern:
# console: "%d - %msg%n"
## path: /var/log/tomcat/test/
# file: /var/log/tomcat/sell.log
# level:
# com.imooc.LoggerTest: debug
上一篇: js对日期进行格式化操作