随笔分类 - Spring
摘要:1、依赖 基于空的maven项目; <dependencies> <!-- https://mvnrepository.com/artifact/junit/junit --> <!--测试依赖包--> <dependency> <groupId>junit</groupId> <artifactI
阅读全文
摘要:官方链接:http://mybatis.org/spring/zh/transactions.html#configuration 1、依赖 tx和aop相关配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.spri
阅读全文
摘要:1、依赖 <dependencies> <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency> <groupId>org.springframework</groupId>
阅读全文
摘要:1、配置 导入AspectJ Weaver包; xml配置aop相关; <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x
阅读全文
摘要:1、配置依赖 xml中扫描包并自动检测类并注册Bean定义【常用】 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://
阅读全文
摘要:1、环境配置 使用注解开发jdk1.5、Spring2.5支持,在xml中添加context相关的是四个配置; <beans default-lazy-init="true" xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=
阅读全文
摘要:1、IoC容器概述 IoC 全称为 Inversion of Control,翻译为 “控制反转”,它还有一个别名为 DI(Dependency Injection),即依赖注入。 所谓 IOC ,就是由 Spring IOC 容器来负责对象的生命周期和对象之间的关系 该org.springfram
阅读全文

浙公网安备 33010602011771号