纯注解开发SSM
用注解替代applicationContext.xml
同前期设置,添加事务注解驱动 @Configuration
//扫描组件,排除SpringMVC对应的bean,等同于
@ComponentScan(value = "com.itheima",excludeFilters = {
@ComponentScan.Filter(type= FilterType.ANNOTATION,classes = {Controller.class})})
@PropertySource("classpath:jdbc.properties")
@Import({JdbcConfig.class,MyBatisConfig.class})
//等同于
@EnableTransactionManagement
public clas
纯注解开发SSM最先出现在Python成神之路。
共有 0 条评论