这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions maven-modules/maven-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<module>jaxws</module>
<module>spotless</module>
<module>external-properties-file</module>
<module>spring-properties-cleaner</module>
</modules>

<build>
Expand Down
63 changes: 63 additions & 0 deletions maven-modules/maven-plugins/spring-properties-cleaner/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-properties-cleaner</artifactId>

<parent>
<artifactId>maven-plugins</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<dependencies>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>uk.org.webcompere</groupId>
<artifactId>spring-properties-cleaner-plugin</artifactId>
<version>1.0.6</version>
<executions>
<execution>
<goals>
<goal>scan</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- final configuration that protects these properties files - comment these all out and bring in the properties
from "original-unfixed" to follow the steps from the example -->
<sort>clustered</sort>
<inlinePrefix>https?://</inlinePrefix>
<common>full</common>
<whitespace>section</whitespace>
</configuration>
</plugin>

<!-- the configuration below in not needed for this tutorial or for Spotless,
but we need it when building all the modules in our Jenkins CI -->
<plugin>
<artifactId>maven-verifier-plugin</artifactId>
<version>${maven.verifier.version}</version>
<configuration>
<verificationFile>../input-resources/verifications.xml</verificationFile>
<failOnError>false</failOnError>
</configuration>
</plugin>
</plugins>

<!-- in a spring project it will default to src/main/resources -->
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
</build>

<properties>
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
spring.redis.timeout=10000
spring.jpa.show-sql=true

redis_host=http://localhost

upstream.host=http://myapp.dev.myorg.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
spring.redis.timeout=2000

upstream.host=https://myapp.prod.myorg.com

redis_host=https://azure.redis6a5d54.microsoft.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
spring.datasource.url=jdbc:postgresql://${db_server}/mydatabase
spring.datasource.username=${USERNAME}
spring.datasource.password=${PASSWORD}
spring.redis.host=${redis_host}
spring.redis.port=6379

# upstream services
upstream.service.users.url=${upstream.host}/api/users
upstream.service.products.url=${upstream.host}/api/products
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
spring.datasource.url=jdbc:postgresql://${db_server}/mydatabase
spring.datasource.username=${USERNAME}
spring.datasource.password = ${PASSWORD}

redis_host=localhost

spring.redis.host=http://${redis_host}
spring.redis.port=6379

redis_host=localhost

spring.jpa.show-sql=true


upstream.host = myapp.dev.myorg.com

# upstream services
upstream.service.users.url=http://${upstream.host}/api/users
upstream.service.products.url=http://${upstream.host}/api/products

spring.redis.timeout=10000
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
spring.datasource.url=jdbc:postgresql://${db_server}/mydatabase
spring.datasource.username=${USERNAME}
spring.datasource.password = ${PASSWORD}

# upstream services
upstream.service.users.url=https://${upstream.host}/api/users
upstream.service.products.url=https://${upstream.host}/api/products

redis_host=azure.redis6a5d54.microsoft.com

spring.redis.host=https://${redis_host}
spring.redis.port=6379

upstream.host = myapp.prod.myorg.com

spring.redis.timeout=2000