개발 무지렁이

[Spring Boot] 설정정보(개발용, 배포용, 테스트용) 본문

Backend/스프링부트

[Spring Boot] 설정정보(개발용, 배포용, 테스트용)

Gaejirang-e 2023. 1. 12. 16:55

[application.yml]

spring:
  profiles:
    active: dev
    include:
      - base-addi
  security:
    oauth2:
      client:
        registration:
          kakao:
            clientId:
            scope: profile_nickname, profile_image, account_email
            client-name: Kakao
            authorization-grant-type: authorization_code
            redirect-uri: http://localhost:8010/login/oauth2/code/kakao
            client-authentication-method: POST
        provider:
          kakao:
            authorization-uri: https://kauth.kakao.com/oauth/authorize
            token-uri: https://kauth.kakao.com/oauth/token
            user-info-uri: https://kapi.kakao.com/v2/user/me
            user-name-attribute: id
  datasource:
    driver-class-name: org.mariadb.jdbc.Driver
custom:
  genFileDirPath: c:/temp/shimmer
logging:
  level:
    com.ll.exam.shimmer.app: debug

[application-dev.yml]

server:
  port: 8010
spring:
  thymeleaf:
    cache: false
    prefix: file:src/main/resources/templates/
  devtools:
    livereload:
      enabled: true
    restart:
      enabled: true
  datasource:
    url: jdbc:mariadb://127.0.0.1:3307/shimmer?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Seoul
    username: root
    password:
  jpa:
    hibernate:
      ddl-auto: create

[application-prod.yml]

spring:
  datasource:
    url: jdbc:mariadb://172.17.0.1:3307/shimmer_prod?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Seoul
    username: shimmer
    password: 1234
  jpa:
    hibernate:
      ddl-auto: none
logging:
  level:
    com.ll.exam.app10.app: info
custom:
  genFileDirPath: /gen

[application-test.yml]

spring:
  datasource:
    url: jdbc:mariadb://${testDbIp:127.0.0.1}:3307/shimmer_test?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Seoul
    username: ${testDbId:root}
    password: ${testDbPw:}
  jpa:
    hibernate:
      ddl-auto: create
Comments