Skip to content

Commit

Permalink
Convert properties to yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-tucek committed Aug 4, 2017
1 parent 06a8f51 commit 8304597
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 19 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}

compileJava.dependsOn(processResources)
}

apply plugin: 'java'
Expand Down Expand Up @@ -56,4 +58,6 @@ dependencies {
compile 'org.webjars.npm:github-com-manifestinteractive-jqvmap:1.5.1'
compile 'org.webjars.bower:moment:2.18.1'

//meta-data annotation processor
optional "org.springframework.boot:spring-boot-configuration-processor"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"properties": [
{
"name": "spring.queries.roles-query",
"type": "java.lang.String",
"description": "Description for spring.queries.roles-query."
},
{
"name": "spring.queries.users-query",
"type": "java.lang.String",
"description": "Description for spring.queries.users-query."
}
] }
19 changes: 0 additions & 19 deletions src/main/resources/application.properties

This file was deleted.

24 changes: 24 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
debug: true
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
password: root
url: jdbc:mysql://localhost/cms_boot?useUnicode=yes&characterEncoding=UTF-8
username: root
http:
encoding:
charset: UTF-8
enabled: true
force: true
jpa:
hibernate:
ddl-auto: update
queries:
roles-query: SELECT u.email, r.role from user u inner join user_roles ur on(u.id=ur.user_id) inner join role r on(ur.roles_id=r.id) where u.email=?;
users-query: SELECT email, password, active FROM user where email=?;
resources:
cache-period: 0
thymeleaf:
cache: false
content-type: text/html
encoding: UTF-8

0 comments on commit 8304597

Please sign in to comment.