jdaugherty commented on PR #14953:
URL: https://github.com/apache/grails-core/pull/14953#issuecomment-3240959347

   The scaffolding failure was caused by the setters() having `@Autowired` and 
not being invoked by the micronaut bean initialization process.  Switching to 
field based fixes that issue.  
   
   I'm still concerned about the lack of test coverage, other than the 
functional test apps, but I think users can try this out in the RC2 and we can 
go from there.
   
   @jamesfredley @matrei  the bean wiring will likely have further issues - 
anywhere we use a setter with `@Autowired` doesn't appear to work when 
grails-micronaut is included.  Switching to constructor based initialization 
worked for the one failure, but there are other examples in the code base that 
don't use constructor initialization.  A work around would be to ignore those 
beans by default in the EnableMicronaut annotation.  Some examples of this: 
   
   1. RequestForwarder trait
   2. ResponseRedirector trait
   3. ResponseRenderer trait 
   4. TransactionManagerAware interface
   5. HibernateConnectionSourceFactory
   6. MongoDatastore
   7. AggregateTimestampProvider
   8. DefaultConstraintRegistry
   9. AbstractConnectionSourceFactory
   10. EventBusAware
   11. GrailsInterceptorHandlerInterceptorAdapter
   12. RestResponder
   13. AbstractVndErrorRenderer
   14. HalJsonRenderer
   15. AbstractLinkingRenderer
   16. DefaultRendererRegistry
   17. ResolvableGroovyTemplateEngine
   18. JsonViewTest
   19. ParamsAwareLocaleChangeInterceptor
   20. DefaultRequestStateLookupStrategy
   21. GrailsWebDataBinder
   22. DefaultDataBindingSourceRegistry
   23. GrailsConventionGroovyPageLocator
   24. GroovyPageViewResolver
   25. TagLibraryInvoker
   26. UrlMappingsHandlerMapping
   
   A lot of these seem related to a change to support multiple message sources 
(577d1c5bea1d88d446dbc7d48f950bfe3160fb0e) 
   
   Do we fix these to say it's supported?  Prior versions of grails had a 
limited number of micronaut beans, so the grails beans weren't a micronaut bean 
by default.  I'm skeptical people were accessing these beans from micronaut, so 
we may be able to make this change gradually.  


-- 
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]

Reply via email to