Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Fully externalized properties. Profiles removed. Dom4j updated to 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
s3curitybug committed Nov 29, 2018
1 parent 787a751 commit c00e2cb
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 94 deletions.
48 changes: 48 additions & 0 deletions config/dev-local.properties
@@ -0,0 +1,48 @@
#====================================================================================================
#
# Application Configuration Properties for Profile dev-local.
#
#====================================================================================================


# Internet.
internet.url = http://myserver:8080/

# Server.
server.port = 8443
server.server-header = GuardedBox

# Server SSL.
server.ssl.key-store = ./config/myserver.p12
server.ssl.key-alias = myserver
server.ssl.key-store-type = PKCS12
server.ssl.enabled-protocols = TLSv1.2
server.ssl.ciphers = TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CCM,TLS_ECDHE_ECDSA_WITH_AES_256_CCM,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

# Server Session.
server.session.timeout = 1800
server.session.cookie.name = SESSION-ID
server.session.cookie.secure = true

# Spring.
spring.mvc.favicon.enabled = false

# Spring DataSource.
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/guardedbox?autoReconnect=true&useSSL=false&characterEncoding=UTF-8
spring.datasource.username = guardedbox
spring.jpa.show-sql = false

# Spring Email.
spring.mail.host = smtp.gmail.com
spring.mail.port = 587
spring.mail.username = accounts@guardedbox.com
spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.starttls.enable = true
spring.mail.properties.mail.smtp.starttls.required = true

# Logging.
logging.level = INFO
logging.pattern = %date{dd/MM/yyyy HH:mm:ss} | %-5level | %class{0}.%method.%line | %message%n

# Captcha.
captcha.verification-url = https://www.google.com/recaptcha/api/siteverify?secret=%s&response=%s&remoteip=%s
48 changes: 48 additions & 0 deletions config/guardedbox-config.properties
@@ -0,0 +1,48 @@
#====================================================================================================
#
# Application Configuration Properties for Profile guardedbox.com.
#
#====================================================================================================


# Internet.
internet.url = https://guardedbox.com/

# Server.
server.port = 8443
server.server-header = GuardedBox

# Server SSL.
server.ssl.key-store = /etc/cert/guardedbox.p12
server.ssl.key-alias = guardedbox
server.ssl.key-store-type = PKCS12
server.ssl.enabled-protocols = TLSv1.2
server.ssl.ciphers = TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CCM,TLS_ECDHE_ECDSA_WITH_AES_256_CCM,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

# Server Session.
server.session.timeout = 1800
server.session.cookie.name = SESSION-ID
server.session.cookie.secure = false

# Spring.
spring.mvc.favicon.enabled = false

# Spring DataSource.
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/guardedbox?autoReconnect=true&useSSL=false&characterEncoding=UTF-8
spring.datasource.username = guardedbox
spring.jpa.show-sql = false

# Spring Email.
spring.mail.host = smtp.gmail.com
spring.mail.port = 587
spring.mail.username = accounts@guardedbox.com
spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.starttls.enable = true
spring.mail.properties.mail.smtp.starttls.required = true

# Logging.
logging.level = INFO
logging.pattern = %date{dd/MM/yyyy HH:mm:ss} | %-5level | %class{0}.%method.%line | %message%n

# Captcha.
captcha.verification-url = https://www.google.com/recaptcha/api/siteverify?secret=%s&response=%s&remoteip=%s
29 changes: 11 additions & 18 deletions pom.xml
Expand Up @@ -30,24 +30,6 @@

</properties>

<!-- Profiles -->
<profiles>

<!-- Profile: dev-local -->
<profile>
<id>dev-local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>profiles/dev-local.properties</filter>
</filters>
</build>
</profile>

</profiles>

<!-- Parent -->
<parent>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -134,6 +116,17 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.1</version>
</dependency>

<!-- Spring Transaction -->
Expand Down
35 changes: 0 additions & 35 deletions profiles/dev-local.properties

This file was deleted.

41 changes: 0 additions & 41 deletions src/main/resources/application.properties

This file was deleted.

0 comments on commit c00e2cb

Please sign in to comment.