jamesfredley commented on PR #15824:
URL: https://github.com/apache/grails-core/pull/15824#issuecomment-5123469858
## How this relates to #16019
These two PRs are complementary, not alternatives.
**This PR (#15824)** keeps the **existing** BeanBuilder path working cleanly
on Spring 7. It moves Spring XML reader / namespace / parser setup behind a
lazy helper so ordinary `resources.groovy` and programmatic BeanBuilder DSL
registration no longer eagerly initialize XML infrastructure. XML
`importBeans`, `xmlns`, and related paths still work, but only initialize XML
support when those features are actually used. No application rewrite is
required; public BeanBuilder behavior stays compatible.
**#16019** is the **forward** registration model. It adds `@GrailsBeans`,
which compiles a `beans = { bean(...) ... }` DSL into real `@AutoConfiguration`
/ `@Bean` methods (with Boot ordering and `@Conditional*` support), and moves
several framework plugins onto that path plus `beanRegistrar()` where plugin
runtime state is needed. It does **not** refactor `BeanBuilder` or fix the
eager-XML issue this PR addresses, and it is not a drop-in replacement for
evaluating existing `resources.groovy` / `doWithSpring` BeanBuilder DSLs.
| | #15824 (this PR) | #16019 |
| --- | --- | --- |
| Goal | Compatibility fix for current BeanBuilder | New Spring-native bean
authoring path |
| Touches `BeanBuilder` | Yes (lazy XML) | No |
| App `resources.groovy` | Keeps working unchanged | Not a substitute |
| Plugin bean registration | Unchanged public DSL | `@GrailsBeans` /
`beanRegistrar()` / generated autoconfig |
| Scope | Small, focused | Large feature + framework conversions |
**Recommendation:** land this PR for Spring 7 BeanBuilder compatibility;
continue #16019 as the longer-term way to declare beans. Merging #16019 does
not make this PR unnecessary while BeanBuilder / `resources.groovy` /
`doWithSpring` still exist
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]