Sean 的个人博客   >   标签墙   >   springboot 标签

SpringBoot-全注解下的SpringIOC

2019-03-12

SpringBoot - ?????SpringIOC springboot ??? springframework?????web????????xml???????spring+springmvc???????????? ???IOC(Inversion of Controller)? IOC??????????????????????????????????j2ee new?????????Bean??????IOC????????????????? ?? - @Configuration @Bean????? @Configuration public class Appconfig{ @Bean(name="user") public User initUser(){ User user = new User(); user.setId(1L); user.setUserName("user_name_1"); user.setNote("note_1"); return user; } } @Configuration ??????java?????Spring??....