-
[spring boot 설정] 2017-10-03 버전JAVA/Spring 2017. 10. 3. 03:07
/build.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'application'
apply plugin: 'maven'
// 메인클래스
mainClassName = 'com.seoyag.menuapp.menugame.Application' //패키지를 포함한 메인클래스
group = 'com.seoyag.menuapp' // 패키지
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
//Java version
sourceCompatibility = 1.8
//컴파일 버전
version = '1.0'
buildscript {
ext {
springBootVersion = '1.5.7.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
jar {
baseName = 'menugameApp' // jar로 만들어질 파일 이름
version = '1.0.0' // 표시 될 버전
manifest {
attributes 'Title': 'menugame', 'Version': version, 'Main-Class': mainClassName // 상세정보
}
// archiveName 'CleanEle.jar'
dependsOn configurations.runtime
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
repositories {
mavenCentral()
}
dependencies {
compile("org.apache.tomcat.embed:tomcat-embed-jasper")
compile("javax.servlet:jstl:1.2")
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-websocket')
compile("org.webjars:stomp-websocket:2.3.3")
compile("org.webjars:bootstrap:3.3.7")
compile("org.webjars:jquery:3.1.0")
compile("org.webjars:sockjs-client:1.0.2")
compile("org.webjars:webjars-locator")
runtime('org.springframework.boot:spring-boot-devtools')
runtime('mysql:mysql-connector-java')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
testCompile('org.springframework.security:spring-security-test')
}
/src/main/resources/application.propoerties
server.port= 8080
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
spring.application.name=Menugame
spring.datasource.url=jdbc:mysql://localhost/menudb?autoReconnect=true&useSSL=false
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
/src/main/resources/application.yml
spring:
devtools:
livereload:
enabled: true
freemarker:
cache: false # 실서버 에서 올릴때 true 로 변경한다.
'JAVA > Spring' 카테고리의 다른 글
spring boot + JPA + security 로그인 설정 (9) 2018.02.19 AWS 8080 포트 열기 (0) 2018.02.12 JAVA/Spring + Angular 5 POST 전송시 400 에러 (0) 2018.02.05 spring boot + angular 2+ 404 not found (0) 2018.01.29 spring 개발환경 구성하기 (0) 2017.10.02