-
Notifications
You must be signed in to change notification settings - Fork 124
Add test case for Spring Boot 4 properties #853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f4c55df to
d0dd5a8
Compare
d0dd5a8 to
7baccd8
Compare
|
Copying the failure here diff --git a/project/src/main/resources/file.yaml b/project/src/main/resources/file.yaml
index c4f3ac8..87d3246 100644
--- a/project/src/main/resources/file.yaml
+++ b/project/src/main/resources/file.yaml
@@ -1,11 +1,10 @@
+
server:
port: 1234
spring:
datasource:
url: jdbc:postgresql://localhost/test
- servlet:
- encoding:
- charset: UTF-8
- enabled: true
- force: true
\ No newline at end of file
+spring.servlet.encoding.charset: UTF-8
+spring.servlet.encoding.enabled: true
+spring.servlet.encoding.force: true
\ No newline at end of file |
|
Since the recipe we use here leverages MergeYaml underneath the proper fix is probably in openrewrite/rewrite. |
Thanks for the assessment! I'll see if I can create a testcase for MergeYaml then. YAML parsing and editing seems to be no easy task 🙂 |
|
Hey @timtebeek, after looking at the YAML ChangePropertyKey recipe it explicitly says:
And example 4 even shows the behavior described here, so maybe this is intended? Then I guess the only solution would be to get openrewrite/rewrite#6358 working. |
|
Ah yes then getting unfolding to work is your best way forward; any reason you're sticking to four spaces? |
|
No specific reason, I would change it to 2 spaces, unfortunately org.openrewrite.yaml.format.Indents can't change it, so we'd need to get another tool to change this, or do you have another suggestion? |
|
Thanks for the clarification; then let's instead focus on fixing this upstream, and close this effort since there's no associated fix here. |
What's changed?
What's your motivation?
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
Any additional context
Checklist