Skip to content

Commit 2722639

Browse files
1 parent 6ab6533 commit 2722639

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

src/main/resources/META-INF/rewrite/examples.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,56 @@ examples:
435435
language: java
436436
---
437437
type: specs.openrewrite.org/v1beta/example
438+
recipeName: org.openrewrite.java.spring.SeparateApplicationPropertiesByProfile
439+
examples:
440+
- description: '`SeparateApplicationPropertiesByProfileTest#separateProfileWithAppend`'
441+
sources:
442+
- before: parent
443+
language: mavenProject
444+
- after: |
445+
app.config.currentEnvironment=LOCAL
446+
path: application-local.properties
447+
language: properties
448+
- before: |
449+
line1=line1
450+
after: |
451+
line1=line1
452+
oauth2.clientId=9999999999999999999999
453+
service.domainUrl= https://this.is.my.dev.url.com
454+
app.config.currentEnvironment=DEV
455+
path: application-dev.properties
456+
language: properties
457+
- before: |
458+
spring.application.name=Openrewrite-PR-Service
459+
#PR-Service
460+
base-url.PR-services=http://my.url.com
461+
exchange-token=1234567890
462+
exchange-tokens=${base-url.PR-services}/exchange-token
463+
!---
464+
spring.config.activate.on-profile=dev
465+
oauth2.clientId=9999999999999999999999
466+
service.domainUrl= https://this.is.my.dev.url.com
467+
app.config.currentEnvironment=DEV
468+
#---
469+
spring.config.activate.on-profile=local
470+
app.config.currentEnvironment=LOCAL
471+
472+
473+
#---
474+
#### XX Configuration ####
475+
spring.config.activate.on-profile=prod
476+
oauth2.clientId=77777777777777
477+
service.domainUrl=https://this.is.my.prod.url.com
478+
after: |
479+
spring.application.name=Openrewrite-PR-Service
480+
#PR-Service
481+
base-url.PR-services=http://my.url.com
482+
exchange-token=1234567890
483+
exchange-tokens=${base-url.PR-services}/exchange-token
484+
path: application.properties
485+
language: properties
486+
---
487+
type: specs.openrewrite.org/v1beta/example
438488
recipeName: org.openrewrite.java.spring.SeparateApplicationYamlByProfile
439489
examples:
440490
- description: '`SeparateApplicationYamlByProfileTest#separateProfile`'

0 commit comments

Comments
 (0)