From 841116f196b43a54c551f97323256e76a88811d4 Mon Sep 17 00:00:00 2001 From: Antoine Rey <antoine.rey@gmail.com> Date: Sun, 23 Oct 2016 16:33:31 +0200 Subject: [PATCH] Caching, compression and devtools configuration --- .../src/main/resources/application-dev.properties | 4 ++++ .../src/main/resources/application-prod.properties | 2 ++ .../src/main/resources/application.properties | 8 +++----- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 springboot-petclinic-server/src/main/resources/application-dev.properties create mode 100644 springboot-petclinic-server/src/main/resources/application-prod.properties diff --git a/springboot-petclinic-server/src/main/resources/application-dev.properties b/springboot-petclinic-server/src/main/resources/application-dev.properties new file mode 100644 index 00000000..db51bdd4 --- /dev/null +++ b/springboot-petclinic-server/src/main/resources/application-dev.properties @@ -0,0 +1,4 @@ +spring.resources.static-locations=classpath:/static/,file:springboot-petclinic-client/src/,file:springboot-petclinic-client/bower_components/ + +spring.devtools.restart.additional-paths=springboot-petclinic-client/src/,springboot-petclinic-client/bower_components/ +spring.devtools.restart.additional-exclude=**/*.html,**/*.js,**/*.css \ No newline at end of file diff --git a/springboot-petclinic-server/src/main/resources/application-prod.properties b/springboot-petclinic-server/src/main/resources/application-prod.properties new file mode 100644 index 00000000..1cee36ad --- /dev/null +++ b/springboot-petclinic-server/src/main/resources/application-prod.properties @@ -0,0 +1,2 @@ +spring.resources.chain.strategy.content.enabled=true +spring.resources.cache-period=86400 \ No newline at end of file diff --git a/springboot-petclinic-server/src/main/resources/application.properties b/springboot-petclinic-server/src/main/resources/application.properties index eee318bd..e99b56c5 100644 --- a/springboot-petclinic-server/src/main/resources/application.properties +++ b/springboot-petclinic-server/src/main/resources/application.properties @@ -15,8 +15,6 @@ management.contextPath=/manage # Logging logging.level.org.springframework=INFO -spring.resources.chain.enabled=true -spring.resources.chain.gzipped=true -spring.resources.cache-period=600 -spring.resources.chain.strategy.content.enabled=true -spring.resources.chain.strategy.content.paths=/**/*.js, /**/*.css, /**/*.png, /**/*.html \ No newline at end of file +server.compression.enabled=true +server.compression.mime-types=application/json,text/css,application/javascript +server.compression.min-response-size=2048 \ No newline at end of file -- GitLab