Languages
[Edit]
EN

Lombok Spring @Autowired annotation in constructor

2 points
Created by:
Brian-Tompset
491

Quick solution:

@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class UserService {
    // ...
}

 

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Lombok - java library

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join