Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
svencc committed Apr 16, 2024
1 parent 3f4f1f8 commit 9955d49
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
23 changes: 15 additions & 8 deletions services/recom-backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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: <!-- https://blog.coffeebeans.at/archives/1356 -->
spring.jpa.properties.hibernate.cache.use_query_cache=true
spring.jpa.properties.hibernate.cache.use_second_level_cache=true
Expand All @@ -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
Expand Down

0 comments on commit 9955d49

Please sign in to comment.