공부/Spring

[Boot] JPA 네이밍 전략

soonh 2019. 3. 11. 15:07

JPA & Hibernate 네이밍 전략

SpringPhysicalNamingStrategy(Default)
=> camel case를 underscore 형태로 변경

PhysicalNamingStrategyStandardImpl
=> 변수 이름을 그대로 사용

application.yml 추가

spring:
profiles: dev
jpa:
    hibernate:
    naming:
        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

에러 :

2019-03-02 14:54:31.281 ERROR 3541 --- [nio-9090-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper   : Table 'ESC.esc_api_target_info' doesn't exist
org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet