[STS] Spring Boot Project 생성
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 |