10 2021 档案

摘要:@Resource 和 @Autowired 一样,是用来实现依赖注入的。 声明一个接口 public interface UserService { void readyTest(String var); } 单个实现类 新建一个类,实现该接口 import org.springframework 阅读全文
posted @ 2021-10-25 14:37 Bin_x 阅读(97) 评论(0) 推荐(0) 编辑
摘要:@Autowired Autowired用于自动装配,对于接口的实现类,可以使用该注解,消除get和set方法。 声明一个接口 public interface UserService { void readyTest(String var); } 单个实现类 新建一个类,实现该接口 import 阅读全文
posted @ 2021-10-25 14:28 Bin_x 阅读(59) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示