문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
springframework:springboot [2018/09/28 12:18] kwon37xi [@EnableAutoConfiguration] |
springframework:springboot [2018/11/28 12:52] kwon37xi |
||
---|---|---|---|
줄 79: | 줄 79: | ||
./gradlew bootRun -Pargs=param1, | ./gradlew bootRun -Pargs=param1, | ||
</ | </ | ||
+ | |||
+ | ==== Property Override ==== | ||
+ | * [[https:// | ||
+ | |||
+ | === Environment Variable 사용 === | ||
+ | < | ||
+ | SPRING_PROFILES_ACTIVE=test gradle clean bootRun | ||
+ | |||
+ | // on Windows | ||
+ | SET SPRING_PROFILES_ACTIVE=test | ||
+ | gradle clean bootRun | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Gradle 에 System Property 그대로 계승 === | ||
+ | < | ||
+ | bootRun.systemProperties = System.properties | ||
+ | </ | ||
+ | |||
+ | === 새로운 bootRun Task 로 만들어버리기 === | ||
+ | * 새로운 '' | ||
+ | < | ||
+ | task bootRunDev(type: | ||
+ | group = ' | ||
+ | |||
+ | doFirst() { | ||
+ | main = bootJar.mainClassName | ||
+ | classpath = sourceSets.main.runtimeClasspath | ||
+ | systemProperty ' | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== SpringApplicationRunListener ==== | ||
+ | * [[https:// | ||
+ | * SpringBoot 로딩중 이벤트를 받아 처리한다. | ||
+ | |||
===== 참고 ===== | ===== 참고 ===== | ||
* [[http:// | * [[http:// |