- 博客(2)
- 收藏
- 关注
原创 SpringBoot中applicationContext对象获取及使用
需求举例:比如我们有两个人,StudentPerson和TeacherPerson,他们实现了person的eat方法,现在要根据前台的请求分别调用各自的eat方法(前台会传个type,比如StudentPerson就会传student)。public interface Person{ void eat();}@Component("student")public class ...
2020-04-10 17:46:13
1479
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人