1. 程式人生 > >Spring boot 傳遞JSON 資料格式 為NULL 格式化。資料庫配置

Spring boot 傳遞JSON 資料格式 為NULL 格式化。資料庫配置

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