문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
springframework:springboot [2018/05/31 17:46] kwon37xi |
springframework:springboot [2018/09/28 12:17] kwon37xi [@EnableAutoConfiguration] |
||
---|---|---|---|
줄 2: | 줄 2: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[springframework: | ||
+ | * [[springframework: | ||
+ | * [[springframework: | ||
+ | * [[springframework: | ||
+ | * [[springframework: | ||
+ | * [[springframework: | ||
+ | * [[springframework: | ||
+ | |||
+ | ===== @EnableAutoConfiguration ===== | ||
+ | * [[https:// | ||
+ | * 특정 Auto Configuration 방지< | ||
+ | @EnableAutoConfiguration(exclude = { | ||
+ | DataSourceAutoConfiguration.class, | ||
+ | DataSourceTransactionManagerAutoConfiguration.class, | ||
+ | HibernateJpaAutoConfiguration.class}) | ||
+ | </ | ||
===== Dependency Version Override ===== | ===== Dependency Version Override ===== | ||
줄 11: | 줄 28: | ||
* [[https:// | * [[https:// | ||
- | |||
- | ===== With JPA ===== | ||
- | * 현재 Spring boot 버전에 [[http:// | ||
- | * [[https:// | ||
- | * 해결책은 naming strategy를 직접 지정해 줄 것< | ||
- | // Hibernate 4 | ||
- | spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy | ||
- | // or | ||
- | spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.DefaultNamingStrategy | ||
- | |||
- | // Hibernate 5 | ||
- | spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl | ||
- | </ | ||
===== JRebel SpringBoot / Gradle ===== | ===== JRebel SpringBoot / Gradle ===== | ||
줄 29: | 줄 33: | ||
- | ===== Date/Time Format ===== | ||
- | * [[http:// | ||
- | * [[http:// | ||
- | * 1.x와 2.x 에서 동일 결과를 낼 수 있는 방식 지정할 것. | ||
===== DataSource ===== | ===== DataSource ===== | ||
줄 46: | 줄 46: | ||
* 위 예에서 설정값은 '' | * 위 예에서 설정값은 '' | ||
+ | ===== BootRun ===== | ||
+ | ==== Debug Mode ==== | ||
+ | <code groovy> | ||
+ | bootRun { | ||
+ | if (project.hasProperty(" | ||
+ | jvmArgs = [" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // suspend=y는 JVM이 뜰 때 Remote Debugger가 접속될 때까지 기다린다. | ||
+ | // 실행 후 바로 종료하는 명령행 애플리케이션의 경우 무조건 y | ||
+ | </ | ||
+ | |||
+ | <code sh> | ||
+ | # -PbootDebug 프라퍼티를 지정하면 디버그 모드로 뜬다. | ||
+ | ./gradlew bootRun -PbootDebug | ||
+ | </ | ||
+ | |||
+ | ==== Application Arguments ==== | ||
+ | * [[https:// | ||
+ | <code groovy> | ||
+ | bootRun { | ||
+ | if (project.hasProperty(' | ||
+ | args project.args.split(',' | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | 위와 같이 설정하고, | ||
+ | |||
+ | <code sh> | ||
+ | ./gradlew bootRun -Pargs=param1, | ||
+ | </ | ||
===== 참고 ===== | ===== 참고 ===== | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
* [[https:// | * [[https:// | ||
- | * [[http:// | ||
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// |