极简工具箱

免费在线工具 · 本地计算 · 无需上传

SpringBoot 配置片段

application.yml 常用片段,按模块复制拼接。

广告位(百度联盟文中广告位)
服务与端口
server:
  port: 8080
  servlet:
    context-path: /api
数据源
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/app?useSSL=false
    username: root
    password: "****"
    driver-class-name: com.mysql.cj.jdbc.Driver
JPA
spring:
  jpa:
    hibernate:
      ddl-auto: update
    show-sql: false
    properties:
      hibernate.format_sql: true
日志
logging:
  level:
    root: INFO
    com.example: DEBUG
广告位(百度联盟信息流广告位)
广告位(百度联盟底部横幅)