I am having the class like below
@Controller
@RequestMapping(value = "/test")
@AllArgsConstructor
public class TestController {
@Qualifier("userDAO")
private final Test testDAO;
}
Below is my bean registration
<bean id="userDAO" class="com.test.dao.TestImpl"
p:sqlSessionFactory-ref="testSqlSessionFactory" />
when I run my app got error like below
No default constructor found; nested exception is java.lang.NoSuchMethodException bean configuration
Also I tried to add the lombok.config file in root and copied the Qualifier annotation, that's also not helped.
spring version is 3.2.15. lombok version 1.18.16
It's working fine with below
@Autowired
public TestController(@Qualifier("userDAO") final Test testDAO) {
this.testDAO = testDAO;
}
How to resolve this?