Upload
ibk-
View
447
Download
4
Embed Size (px)
Citation preview
개발 엔지니어 삶- Gradle 사용하기
2015 년 8 월공부 + 열정 + 가정 + 회사
build.gradle
buildscript { ext { springBootVersion = '1.2.2.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } }
apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'idea' apply plugin: 'spring-boot' apply plugin: 'war'
war { baseName = 'gradleWebServer' version = '1.0.1-SNAPSHOT' }
sourceCompatibility = 1.7 targetCompatibility = 1.7
repositories { mavenCentral() }
build.gradle
configurations { providedRuntime }
dependencies { compile("org.springframework.boot:spring-boot-starter-hornetq") compile("org.springframework.boot:spring-boot-starter-web") compile("org.springframework.boot:spring-boot-starter-integration") compile("org.springframework.integration:spring-integration-core") compile('org.springframework.integration:spring-integration-http:4.1.3.RELEASE') compile('org.springframework.integration:spring-integration-jms:4.1.2.RELEASE') compile("org.springframework.integration:spring-integration-java-dsl:1.0.1.RELEASE") compile('org.springframework.data:spring-data-commons:1.9.2.RELEASE') compile("com.google.guava:guava:16.0.1") compile('org.apache.activemq:activemq-broker:5.11.1') compile('org.apache.activemq:activemq-kahadb-store:5.11.1') compile('javax.el:javax.el-api:3.0.0') providedRuntime("org.springframework.boot:spring-boot-starter-tomcat") testCompile("org.springframework.boot:spring-boot-starter-test") }
mainClassName = 'ldcc.integration.exercise.SpringIntegrationExerciseApplication'
task wrapper(type: Wrapper) { gradleVersion = '2.5' }
gradle/wrapper/gradle-wrapper.properties
distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/distsdistributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip
build.gradle
package ldcc..integration.exercise;
import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.PropertySource; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
@SpringBootApplication @ImportResource(value = "/META-INF/integration-context.xml") @PropertySource("classpath:application.properties") public class SpringIntegrationExerciseApplication {
@Bean public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { return new PropertySourcesPlaceholderConfigurer(); } public static void main(String[] args) { SpringApplication.run(SpringIntegrationExerciseApplication.class, args); } }
프로젝트 파일 - 디렉토리 구조
빌더 - gradle 메뉴
빌더 - gradle 빌더 ( run, jar , war , assemble , bootRun, build , clean )
빌더 - gradle 빌더 ( bootRun )