2021
01-29
01-29
springboot 实现bean手动注入操作
1、springboot启动类实现接口ApplicationListener<ContextRefreshedEvent>,实现方法onApplicationEvent,初始化上下文packagetest.projectTest;importorg.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;importorg.springframework.boot.SpringApplication;importorg.springframework.boot.autoconfigure.EnableAutoConfiguration;importorg.springframework.boot.autoconfigure.SpringBootApplication;import...
继续阅读 >