摘要:
Spring容器第一次启动时,初始化管理员账户 使用ApplicationListener监听器,ApplicationEvent:监听Spring容器的所有事件 ContextRefreshedEvent:容器启动事件 @Component public class InitAdminListen 阅读全文
posted @ 2022-03-18 12:13
1131012
阅读(37)
评论(0)
推荐(0)
摘要:
https://www.cnblogs.com/redos/p/14945483.html 方式一 使用@Autowired或者写在Controller的处理方法中,Spring容器会帮忙注入 @Controller public class HelloController { @Autowired 阅读全文
posted @ 2022-03-18 11:52
1131012
阅读(656)
评论(0)
推荐(0)
浙公网安备 33010602011771号