79166451

Date: 2024-11-07 12:40:37
Score: 1.5
Natty:
Report link

You should define the annotation @Lazy and @Autowired in one of them. Also, you should delete the definition in the constructor. I hope it's works! It's works for me in this example that I have:

@Service public class MyClassService1Impl{

@Lazy
@Autowired
private MiClassService2Impl;

}

Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Whitelisted phrase (-1): works for me
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Lazy
  • User mentioned (0): @Autowired
  • User mentioned (0): @Service
  • Low reputation (1):
Posted by: Laura Hernandez