spring

spring_application.yml

ssmm95 2024. 11. 1. 13:03
spring:
  application:
    name: login-spring    # 애플리케이션 이름을 "login-spring"으로 설정

  datasource:
    url: jdbc:h2:tcp://localhost/~/testApi    # H2 데이터베이스에 연결하는 URL 설정 (로컬 호스트에서 "testApi" 데이터베이스 사용)
    //jdbc:h2:tcp://localhost/~/testApi 이주소는 본인이 설정한 주소값
    driver-class-name: org.h2.Driver          # 데이터베이스 드라이버 클래스를 H2 데이터베이스 드라이버로 설정
    username: sa                              # 데이터베이스 접속 사용자 이름 설정 (여기서는 "sa"로 설정)

  jpa:
    hibernate:
      ddl-auto: update                        # 데이터베이스 스키마를 자동으로 업데이트 (테이블 구조가 변경되면 반영)
      //테이블을 생성할 때는 create로 변경한다
    properties:
      hibernate:
        format_sql: true                      # SQL 문을 포맷하여 보기 좋게 출력

  thymeleaf:
    prefix: classpath:/templates/             # Thymeleaf 템플릿 파일 경로 설정 (템플릿 파일이 "templates" 폴더에 위치)
    suffix: .html                             # 템플릿 파일의 확장자를 ".html"로 설정

logging:
  level:
    org.hibernate.SQL: debug                  # Hibernate가 생성하는 SQL 문을 디버그 레벨로 출력 (SQL 문을 상세히 확인 가능)
    org.hibernate.orm.jdbc.bind: trace        # SQL 바인딩 값도 트레이스 레벨로 출력 (SQL 문에 바인딩된 실제 값까지 확인 가능)

'spring' 카테고리의 다른 글

SPRING_Optinal  (0) 2024.11.22
spring_login-spring  (0) 2024.11.01
spring_IntellJ 트리식 구조로 프로젝트 패키지 보기  (0) 2024.10.31
spring_인텔리제이에서 부트스트랩 적용하기  (0) 2024.10.31
spring_home  (0) 2024.10.30