Skip to content

Add recipe to rename logback.xml to logback-spring.xml#997

Merged
Jenson3210 merged 7 commits intomainfrom
Jenson3210/migrate-crudrepo-methods
Apr 14, 2026
Merged

Add recipe to rename logback.xml to logback-spring.xml#997
Jenson3210 merged 7 commits intomainfrom
Jenson3210/migrate-crudrepo-methods

Conversation

@Jenson3210
Copy link
Copy Markdown
Contributor

@Jenson3210 Jenson3210 commented Apr 14, 2026

Summary

  • Adds RenameLogbackToLogbackSpring recipe that renames logback.xmllogback-spring.xml when the file contains Spring-specific tags (<springProfile> or <springProperty>)

  • Registers the recipe in the UpgradeSpringBoot_3_0 migration

  • Spring Boot only processes these extensions when the config file uses the -spring.xml naming convention; a plain logback.xml is loaded too early by logback itself

  • Closes moderneinc/customer-requests#2210

Test plan

  • Rename when <springProfile> is present
  • Rename when <springProperty> is present
  • No change when no Spring tags are present
  • No change for logback-test.xml (Spring Boot doesn't support logback-spring-test.xml)
  • Deeply nested Spring tags still trigger rename

Spring Boot only processes Spring-specific logback extensions (<springProfile>,
<springProperty>) when the config file is named logback-spring.xml. This recipe
detects these tags and renames the file as part of the Spring Boot 3.0 migration.

Closes moderneinc/customer-requests#2210
@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite Apr 14, 2026
@Jenson3210 Jenson3210 merged commit 9193d54 into main Apr 14, 2026
1 check failed
@Jenson3210 Jenson3210 deleted the Jenson3210/migrate-crudrepo-methods branch April 14, 2026 15:28
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants