mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 07:45:49 +00:00
convert application.properties to application.yml
This commit is contained in:
parent
4f8f21dd19
commit
afa144839e
4 changed files with 32 additions and 32 deletions
|
@ -1,7 +0,0 @@
|
|||
# database init, supports mysql too
|
||||
database=mysql
|
||||
spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/petclinic}
|
||||
spring.datasource.username=${MYSQL_USER:petclinic}
|
||||
spring.datasource.password=${MYSQL_PASS:petclinic}
|
||||
# SQL is written to be idempotent so this is safe
|
||||
spring.datasource.initialization-mode=always
|
8
src/main/resources/application-mysql.yml
Normal file
8
src/main/resources/application-mysql.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
# database init, supports mysql too
|
||||
database: mysql
|
||||
spring.datasource.url: ${MYSQL_URL:jdbc:mysql://localhost/petclinic}
|
||||
spring.datasource.username: ${MYSQL_USER:petclinic}
|
||||
spring.datasource.password: ${MYSQL_PASS:petclinic}
|
||||
|
||||
# SQL is written to be idempotent so this is safe
|
||||
spring.datasource.initialization-mode: always
|
|
@ -1,25 +0,0 @@
|
|||
# database init, supports mysql too
|
||||
database=h2
|
||||
spring.datasource.schema=classpath*:db/${database}/schema.sql
|
||||
spring.datasource.data=classpath*:db/${database}/data.sql
|
||||
|
||||
# Web
|
||||
spring.thymeleaf.mode=HTML
|
||||
|
||||
# JPA
|
||||
spring.jpa.hibernate.ddl-auto=none
|
||||
spring.jpa.open-in-view=false
|
||||
|
||||
# Internationalization
|
||||
spring.messages.basename=messages/messages
|
||||
|
||||
# Actuator
|
||||
management.endpoints.web.exposure.include=*
|
||||
|
||||
# Logging
|
||||
logging.level.org.springframework=INFO
|
||||
# logging.level.org.springframework.web=DEBUG
|
||||
# logging.level.org.springframework.context.annotation=TRACE
|
||||
|
||||
# Maximum time static resources should be cached
|
||||
spring.resources.cache.cachecontrol.max-age=12h
|
24
src/main/resources/application.yml
Normal file
24
src/main/resources/application.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
# database init, supports mysql too
|
||||
database: h2
|
||||
spring:
|
||||
datasource:
|
||||
schema: classpath*:db/${database}/schema.sql
|
||||
data: classpath*:db/${database}/data.sql
|
||||
jpa:
|
||||
hibernate.ddl-auto: none
|
||||
open-in-view: false
|
||||
spring.thymeleaf.mode: HTML
|
||||
|
||||
# Internationalization
|
||||
spring.messages.basename: messages/messages
|
||||
|
||||
# Actuator
|
||||
management.endpoints.web.exposure.include: '*'
|
||||
|
||||
# Logging
|
||||
logging.level.org.springframework: INFO
|
||||
# logging.level.org.springframework.web=DEBUG
|
||||
# logging.level.org.springframework.context.annotation=TRACE
|
||||
|
||||
# Maximum time static resources should be cached
|
||||
spring.resources.cache.cachecontrol.max-age: 12h
|
Loading…
Reference in a new issue