ylliX - Online Advertising Network
Vertex AI - Antrophic and Mistral models: Why does it require Imegen access?

OpenReWrite Problem with NoAutowiredOnConstructor


I am tryin to move from Spring 2.7 to Spring 3 using OpenRewrite. The first step I tried is the Spring 3 migration. The recipe NoAutowiredOnConstructor is causing a problem. As I understand it, it looks for @Autowired in a single constructor and removes if present. It also removes the import of “Autowired” which is calling the problem. A lot of out code has empty constructors and uses @Autowired for field injection. I know the arguments that we should use constructor injection…but there is a lot of code setup like this and I would prefer not to take on those changes as part of the migration. The recipe sees the constructor (without Autowired)m and then removes the Autowired import.

Is there a way to address this issue in the existing recipe or can I disable the recipe as part of the Spring 3 recipe?

Thanks in advance,



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *