Skip to content

Commit

Permalink
Merge pull request #25980 from timothystone/fix/spring-profiles-active
Browse files Browse the repository at this point in the history
build(generator): default maven-resources-plugin to the spring-boot-parent definition
  • Loading branch information
DanielFran authored Apr 29, 2024
2 parents 9690e42 + 117f154 commit 0db3cbe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions generators/server/templates/gradle/profile_dev.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ processResources {
}
<%_ if (!serviceDiscoveryAny) { _%>
filter {
it.replace("#spring.profiles.active#", springProfiles)
it.replace("@spring.profiles.active@", springProfiles)
}
<%_ } _%>
}
<%_ if (serviceDiscoveryEureka || serviceDiscoveryConsul) { _%>
filesMatching("**/bootstrap.yml") {
filter {
it.replace("#spring.profiles.active#", springProfiles)
it.replace("@spring.profiles.active@", springProfiles)
}
}
<%_ } _%>
Expand Down
4 changes: 2 additions & 2 deletions generators/server/templates/gradle/profile_prod.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ processResources {
}
<%_ if (!serviceDiscoveryAny) { _%>
filter {
it.replace("#spring.profiles.active#", springProfiles)
it.replace("@spring.profiles.active@", springProfiles)
}
<%_ } _%>
}
<%_ if (serviceDiscoveryEureka || serviceDiscoveryConsul) { _%>
filesMatching("**/bootstrap.yml") {
filter {
it.replace("#spring.profiles.active#", springProfiles)
it.replace("@spring.profiles.active@", springProfiles)
}
}
<%_ } _%>
Expand Down
4 changes: 0 additions & 4 deletions generators/server/templates/pom.xml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,6 @@
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>#</delimiter>
</delimiters>
<resources>
<resource>
<directory><%= SERVER_MAIN_RES_DIR %></directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ spring:
# The commented value for `active` can be replaced with valid Spring profiles to load.
# Otherwise, it will be filled in by <%= buildTool %> when building the JAR file
# Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
active: #spring.profiles.active#
active: '@spring.profiles.active@'
group:
dev:
- dev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spring:
# The commented value for `active` can be replaced with valid Spring profiles to load.
# Otherwise, it will be filled in by <%= buildTool %> when building the JAR file
# Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
active: #spring.profiles.active#
active: '@spring.profiles.active@'
cloud:
<%_ if (serviceDiscoveryConsul) { _%>
consul:
Expand Down

0 comments on commit 0db3cbe

Please sign in to comment.