IDE/Spring Tool Suite

[STS] Spring Boot Project 생성

한희성 2018. 6. 1.
반응형

1. starter Project 생성

2. build.gradle 기본셋팅

//for reload class, resources

compile("org.springframework.boot:spring-boot-devtools")

//for getter,setter,logger

compile('org.projectlombok:lombok:latest.release')

//for dao(mybatis)

compile group: 'org.mybatis.spring.boot', name: 'mybatis-spring-boot-starter', version: '1.1.1'

compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1")

compile('org.springframework.boot:spring-boot-starter-jdbc')

runtime('mysql:mysql-connector-java')

//for handlebars

compile('pl.allegro.tech.boot:handlebars-spring-boot-starter:0.2.12') 



3. application.properties 기본 셋팅

server.port=8001


#HandleBars

#https://github.com/allegro/handlebars-spring-boot-starter

handlebars.enabled: true

handlebars.prefix: classpath:/templates/

handlebars.suffix: .html

handlebars.cache: false

handlebars.registerMessageHelper: true

handlebars.failOnMissingFile: false

handlebars.prettyPrint: false


spring.datasource.url=

spring.datasource.username=

spring.datasource.password=


#mysql default interactive_timeout=864000(8hours), so health check

spring.datasource.validationQuery=SELECT 1

#Connection Pool

# Number of ms to wait before throwing an exception if no connection is available.

spring.datasource.max-wait=10000

# Maximum number of active connections that can be allocated from this pool at the same time.

spring.datasource.max-active=200




반응형

'IDE > Spring Tool Suite' 카테고리의 다른 글

[STS] logback-spring.xml 설정  (0) 2018.07.21
[STS] lombok 설치  (0) 2018.07.21
[STS] 기본셋팅 항목  (0) 2018.06.03
[STS] POJO 객체  (0) 2018.06.02
[STS] .ini 파일 설정  (0) 2018.04.28

댓글

💲 추천 글