728x90
반응형
Gradle 기본 설정을 해보자

project 가 생성되면서 만들어진 build.gradle 파일...

어떤 라이브러리를 사용할지가 결정한다...

예로 json 포맷 처리를 위한 라이브러리 선택시 대용량 처리는 jackson , 잦은 분산처리는 gson...
date 관련 라이브러리는 많이 쓰는 joda-time ..
이런식으로 라이브러리를 결정한다...


아래는 참고용이다.
ojdbc6 같은경우는 repositories 를 따로 설정해야한다.
mybatis 설정은 뒤에서 따로 작성하겠습니다.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
buildscript {
    ext {
        springBootVersion = '2.0.0.BUILD-SNAPSHOT'
    }
    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/snapshot" }
        maven { url "https://repo.spring.io/milestone" }
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}
 
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
 
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
 
repositories {
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/milestone" }
 
    //ojdbc6
}
 
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
 
configurations {
    providedRuntime
}
 
dependencies {
    //lombok
    compile('org.projectlombok:lombok')
 
    //web
    compile('org.springframework.boot:spring-boot-starter-web')
 
    //template
    compile('org.springframework.boot:spring-boot-starter-freemarker')
 
    //mybatis
    compile('org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16')
    compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1')
    compile('org.springframework.boot:spring-boot-starter-jdbc')
    compile('com.oracle:ojdbc6:11.2.0.3') //11.1.0.7.0
 
    //caseFormat
    compile('com.google.guava:guava:r05')
 
    //gson
    compile('com.google.code.gson:gson:2.3.1')
 
    //captcha
    compile('com.liferay:nl.captcha.simplecaptcha:1.1.1')
 
    //common
    compile('org.apache.commons:commons-lang3:3.3.2')
 
    //date
    compile('joda-time:joda-time:2.8.1')
 
    //mail
    compile('org.springframework.boot:spring-boot-starter-mail')
    compile('javax.mail:mail:1.4.7')
    compile('com.sun.mail:javax.mail')
 
    //tomcat
    providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
 
    //test
    testCompile('junit:junit:4.12')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}
 

 

728x90
반응형

'SPRINGBOOT > 노하우정보' 카테고리의 다른 글

7. Spring Boot - Mapper  (0) 2017.05.29
6. Spring Boot - Template Engine  (0) 2017.05.29
5. Spring Boot - Mybatis 설정  (0) 2017.05.29
4. Spring Boot - yml 설정  (0) 2017.05.29
2. Spring Boot - 프로젝트 생성  (0) 2017.05.29
1. Spring Boot - 이클립스 세팅  (0) 2017.05.29
블로그 이미지

nineDeveloper

안녕하세요 현직 개발자 입니다 ~ 빠르게 변화하는 세상에 뒤쳐지지 않도록 우리모두 열심히 공부합시다 ~! 개발공부는 넘나 재미있는 것~!

,