[ROO-3941] Avoid creation of @Autowired constructors for JSON and THYMELEAF controllers when there is already one in .java Created: 26/Oct/17 Updated: 11/Apr/18 Resolved: 26/Oct/17
|Reporter:||Sergio Clares Martínez||Assignee:||Jose Manuel Vivó ( Chema ) - DISID.|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
When user adds a custom @Autowired constructor in any controller class, with different args that constructor managed by Roo, this constructor remains in the ITD with @Autowired so there are compilation problems.
Try to solve this by removing @Autowired on ITD constructor if already exists one in the .java.
|Comment by Jose Manuel Vivó ( Chema ) - DISID. [ 26/Oct/17 ]|
Fixed in c698f5e
For Thymeleaf and JSON controllers.
|Comment by Jose Manuel Vivó ( Chema ) - DISID. [ 11/Apr/18 ]|
Now if Roo detects a @Autowired constructor already declared in java file, in .aj file a constructor is generated but without @Autowired annotation.
This makes able to still use the .aj file constructor without push-in it.