V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  savingrun  ›  全部回复第 6 页 / 共 6 页
回复总数  101
1  2  3  4  5  6  
2022 年 7 月 23 日
回复了 NoKey 创建的主题 程序员 Java 后台开发,大家用 @Autowired 多么
建议使用构造函数注入 +1
配合 lombok 的 @RequiredArgsConstructor

例子:

@Service
@RequiredArgsConstructor
public class xxxxServiceImpl implements xxxAppService, xxxAdminService {

private final xxxxDao dao;

}
1  2  3  4  5  6  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2679 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 10:21 · PVG 18:21 · LAX 03:21 · JFK 06:21
♥ Do have faith in what you're doing.