diff --git a/services/recom-backend/src/main/java/com/recom/api/commons/HttpCommons.java b/services/recom-backend/src/main/java/com/recom/api/commons/HttpCommons.java index d5997f51..2f17bd6b 100644 --- a/services/recom-backend/src/main/java/com/recom/api/commons/HttpCommons.java +++ b/services/recom-backend/src/main/java/com/recom/api/commons/HttpCommons.java @@ -2,13 +2,16 @@ public class HttpCommons { + // SECURITY SCHEME + public static final String BEARER_AUTHENTICATION_REQUIREMENT = "BearerAuthentication"; + public static final String BEARER_SCHEME = "bearer"; + public static final String BEARER_FORMAT = "JWT"; + + // 200er public static final String OK = "O.K."; public static final String OK_CODE = "200"; - public static final String BEARER_AUTHENTICATION_REQUIREMENT = "BearerAuthentication"; - public static final String BEARER_SCHEME = "bearer"; - public static final String BEARER_FORMAT = "JWT"; // 400er public static final String UNAUTHORIZED = "Unauthorized"; diff --git a/services/recom-backend/src/main/resources/application.properties b/services/recom-backend/src/main/resources/application.properties index 4a77e445..1dad287d 100644 --- a/services/recom-backend/src/main/resources/application.properties +++ b/services/recom-backend/src/main/resources/application.properties @@ -1,26 +1,27 @@ spring.application.name=RECOM +#SPRING BOOT SERVER CONFIG server.port=80 - +server.compression.enabled=true +server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,text/css,application/javascript,image/svg+xml +server.compression.min-response-size=1024 spring.threads.virtual.enabled=true + + +#JPA DATASOURCE CONFIG: spring.datasource.url=jdbc:h2:file:${recom.data-base-dir}/h2db/recomh2;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=8034;USER=username;PASSWORD=password spring.datasource.username=username spring.datasource.password=password spring.datasource.hikari.maximumPoolSize=40 -# executes data.sql AFTER hibernate DDL -spring.jpa.defer-datasource-initialization=true -# run data.sql on every startup (not only on first startup) +# executes data.sql AFTER hibernate DDL; run data.sql on every startup (not only on first startup) spring.sql.init.mode=always # deactivate h2 web console! spring.h2.console.enabled=false -server.compression.enabled=true -server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,text/css,application/javascript,image/svg+xml -server.compression.min-response-size=1024 - +spring.jpa.defer-datasource-initialization=true spring.jpa.open-in-view=false spring.jpa.show-sql=false spring.jpa.generate-ddl=true @@ -36,6 +37,8 @@ spring.jpa.properties.hibernate.jdbc.batch_size=100 spring.jpa.properties.hibernate.jdbc.fetch_size=100 spring.jpa.properties.hibernate.jdbc.batch_versioned_data=true + + #HIBERNATE CACHE: spring.jpa.properties.hibernate.cache.use_query_cache=true spring.jpa.properties.hibernate.cache.use_second_level_cache=true @@ -52,11 +55,15 @@ spring.cache.jcache.config=classpath:ehcache-spring.xml +#APPLICATION LOGGING; logging.level.com.recom=ERROR logging.level.org.hibernate.type=ERROR logging.level.org.hibernate.SQL=ERROR logging.level.com.vladmihalcea.hibernate.type.util.LogUtils=OFF + + +#RECOM APPLICATION PROPERTIES recom.data-base-dir=${user.home}/RECOMBackend recom.ehcache-base-dir=${recom.data-base-dir}/ehcache recom.ehcache-appcache-base-dir=${recom.data-base-dir}/ehcache_appcache