├── spring课堂笔记.assets ├── 1.png ├── 10.png ├── 11.png ├── 12.png ├── 13.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png └── 1078856-20170205160357354-490660449.gif └── Spring-Study ├── Spring-Study.iml ├── spring-04-di ├── spring-04-di.iml ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ └── pojo │ │ │ │ ├── Address.java │ │ │ │ ├── User.java │ │ │ │ └── Student.java │ │ └── resources │ │ │ ├── UserBeans.xml │ │ │ └── beans.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-01-ioc1 ├── spring-01-ioc1.iml ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ ├── dao │ │ │ │ ├── UserDao.java │ │ │ │ ├── UserDaoImpl.java │ │ │ │ ├── UserDaoMysqlImpl.java │ │ │ │ ├── UserDaoOracleImpl.java │ │ │ │ └── UserDaoSqlServerImpl.java │ │ │ │ └── service │ │ │ │ ├── UserService.java │ │ │ │ └── UserServiceImpl.java │ │ └── resources │ │ │ └── beans.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-03-ioc2 ├── spring-03-ioc2.iml ├── src │ ├── main │ │ ├── resources │ │ │ ├── applicationContext.xml │ │ │ ├── beans.xml │ │ │ ├── beans2.xml │ │ │ └── beans3.xml │ │ └── java │ │ │ └── nuc │ │ │ └── ss │ │ │ └── pojo │ │ │ ├── User.java │ │ │ └── UserT.java │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-06-anno ├── spring-06-anno.iml ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ ├── dao │ │ │ │ └── UserDao.java │ │ │ │ ├── service │ │ │ │ └── UserService.java │ │ │ │ ├── controller │ │ │ │ └── UserController.java │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ └── applicationContext.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-08-proxy ├── spring-08-proxy.iml ├── src │ └── main │ │ └── java │ │ └── nuc │ │ └── ss │ │ ├── demo01 │ │ ├── Rent.java │ │ ├── Host.java │ │ ├── Client.java │ │ └── Proxy.java │ │ ├── demo03 │ │ ├── Rent.java │ │ ├── Host.java │ │ ├── Client.java │ │ └── ProxyInvocationHandler.java │ │ ├── demo02 │ │ ├── UserService.java │ │ ├── Client.java │ │ ├── UserServiceImpl.java │ │ └── UserServiceProxy.java │ │ └── demo04 │ │ ├── Client.java │ │ └── ProxyInvocationHandler.java └── pom.xml ├── spring-05-autowired ├── spring-05-autowired.iml ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ └── pojo │ │ │ │ ├── Cat.java │ │ │ │ ├── Dog.java │ │ │ │ └── People.java │ │ └── resources │ │ │ └── beans.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-07-appconfig ├── spring-07-appconfig.iml ├── src │ ├── main │ │ └── java │ │ │ └── nuc │ │ │ └── ss │ │ │ ├── config │ │ │ ├── MyConfig2.java │ │ │ └── MyConfig.java │ │ │ └── pojo │ │ │ └── User.java │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-02-hellospring ├── spring-02-hellospring.iml ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ └── pojo │ │ │ │ └── Hello.java │ │ └── resources │ │ │ └── beans.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-10-mybatis ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ ├── mapper │ │ │ │ ├── UserMapper.java │ │ │ │ ├── UserMapper.xml │ │ │ │ ├── UserMapperImpl2.java │ │ │ │ └── UserMapperImpl.java │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ ├── mybatis-config.xml │ │ │ ├── applicationContext.xml │ │ │ └── spring-dao.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-09-aop ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ ├── service │ │ │ │ ├── UserService.java │ │ │ │ └── UserServiceImpl.java │ │ │ │ ├── diy │ │ │ │ ├── DiyPointCut.java │ │ │ │ └── AnnotationPointCut.java │ │ │ │ └── log │ │ │ │ ├── AfterLog.java │ │ │ │ └── Log.java │ │ └── resources │ │ │ └── applicationContext.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── spring-11-transaction ├── src │ ├── main │ │ ├── java │ │ │ └── nuc │ │ │ │ └── ss │ │ │ │ ├── mapper │ │ │ │ ├── UserMapper.java │ │ │ │ ├── UserMapper.xml │ │ │ │ └── UserMapperImpl.java │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ ├── mybatis-config.xml │ │ │ ├── applicationContext.xml │ │ │ └── spring-dao.xml │ └── test │ │ └── java │ │ └── MyTest.java └── pom.xml ├── .idea ├── misc.xml ├── dataSources.local.xml ├── dataSources.xml ├── compiler.xml ├── inspectionProfiles │ └── Project_Default.xml ├── uiDesigner.xml ├── dataSources │ └── b305dbe5-0b75-41da-9b2b-3b4bc6eeb2c2.xml └── workspace.xml ├── note.md └── pom.xml /spring课堂笔记.assets/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/1.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/10.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/11.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/12.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/13.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/2.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/3.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/4.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/5.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/6.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/7.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/8.png -------------------------------------------------------------------------------- /spring课堂笔记.assets/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/9.png -------------------------------------------------------------------------------- /Spring-Study/Spring-Study.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/spring-04-di.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/spring-01-ioc1.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/spring-03-ioc2.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/spring-06-anno.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/spring-08-proxy.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-05-autowired/spring-05-autowired.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-07-appconfig/spring-07-appconfig.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-02-hellospring/spring-02-hellospring.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/java/nuc/ss/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.dao; 2 | 3 | public interface UserDao { 4 | void getUser(); 5 | } 6 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo01/Rent.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo01; 2 | 3 | public interface Rent { 4 | public void rent(); 5 | } 6 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo03/Rent.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo03; 2 | 3 | public interface Rent { 4 | public void rent(); 5 | } 6 | -------------------------------------------------------------------------------- /spring课堂笔记.assets/1078856-20170205160357354-490660449.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzh66666/Spring5-kuang-/HEAD/spring课堂笔记.assets/1078856-20170205160357354-490660449.gif -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/java/nuc/ss/service/UserService.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.service; 2 | 3 | public interface UserService { 4 | public void getUser(); 5 | } 6 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/src/main/java/nuc/ss/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | @Repository 6 | public class UserDao { 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-05-autowired/src/main/java/nuc/ss/pojo/Cat.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | public class Cat { 4 | public void shout() { 5 | System.out.println("瞄瞄瞄..."); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-05-autowired/src/main/java/nuc/ss/pojo/Dog.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | public class Dog { 4 | public void shout() { 5 | System.out.println("汪汪汪..."); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/src/main/java/nuc/ss/service/UserService.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | @Service 6 | public class UserService { 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/src/main/java/nuc/ss/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | 5 | @Controller 6 | public class UserController { 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-07-appconfig/src/main/java/nuc/ss/config/MyConfig2.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | 5 | @Configuration 6 | public class MyConfig2 { 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo03/Host.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo03; 2 | 3 | //房东 4 | public class Host implements Rent { 5 | public void rent() { 6 | System.out.println("房东要出租房子"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/java/nuc/ss/dao/UserDaoImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.dao; 2 | 3 | public class UserDaoImpl implements UserDao { 4 | public void getUser() { 5 | System.out.println("默认获取用户的数据"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/java/nuc/ss/dao/UserDaoMysqlImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.dao; 2 | 3 | public class UserDaoMysqlImpl implements UserDao { 4 | public void getUser() { 5 | System.out.println("Mysql获取用户数据"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/java/nuc/ss/dao/UserDaoOracleImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.dao; 2 | 3 | public class UserDaoOracleImpl implements UserDao{ 4 | public void getUser() { 5 | System.out.println("Oracle获取用户数据"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo01/Host.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo01; 2 | 3 | //房东 4 | public class Host implements Rent { 5 | 6 | public void rent() { 7 | System.out.println("房东要出租房子"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/java/nuc/ss/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.mapper; 2 | 3 | import nuc.ss.pojo.User; 4 | 5 | import java.util.List; 6 | 7 | public interface UserMapper { 8 | List selectUser(); 9 | } 10 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/java/nuc/ss/pojo/User.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class User { 7 | private int id; 8 | private String name; 9 | private String pwd; 10 | } 11 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/java/nuc/ss/dao/UserDaoSqlServerImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.dao; 2 | 3 | public class UserDaoSqlServerImpl implements UserDao{ 4 | public void getUser() { 5 | System.out.println("SqlServer获取用户数据"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo02/UserService.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo02; 2 | 3 | public interface UserService { 4 | public void add(); 5 | public void delete(); 6 | public void update(); 7 | public void query(); 8 | } 9 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/main/java/nuc/ss/service/UserService.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.service; 2 | 3 | public interface UserService { 4 | public void add(); 5 | public void delete(); 6 | public void update(); 7 | public void select(); 8 | } 9 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/main/java/nuc/ss/diy/DiyPointCut.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.diy; 2 | 3 | public class DiyPointCut { 4 | public void before() { 5 | System.out.println("==========方法执行前============"); 6 | } 7 | 8 | public void after() { 9 | System.out.println("==========方法执行后============"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/main/java/nuc/ss/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.mapper; 2 | 3 | import nuc.ss.pojo.User; 4 | 5 | import java.util.List; 6 | 7 | public interface UserMapper { 8 | List selectUser(); 9 | 10 | //增加一个用户 11 | int addUser(User user); 12 | 13 | //删除一个用户 14 | int deleteUser(int id); 15 | } 16 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/main/java/nuc/ss/pojo/User.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class User { 11 | private int id; 12 | private String name; 13 | private String pwd; 14 | } 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo01/Client.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo01; 2 | 3 | public class Client { 4 | public static void main(String[] args) { 5 | //房东要租房子 6 | Host host = new Host(); 7 | //代理,中介帮房东租房子,但是代理一般会有一些附属操作 8 | Proxy proxy = new Proxy(host); 9 | 10 | //你不用面对房东,直接面对中介 11 | proxy.rent(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo02/Client.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo02; 2 | 3 | public class Client { 4 | public static void main(String[] args) { 5 | UserService userService = new UserServiceImpl(); 6 | 7 | UserServiceProxy proxy = new UserServiceProxy(); 8 | proxy.setUserService(userService); 9 | 10 | proxy.add(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/java/nuc/ss/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Spring-Study/spring-02-hellospring/src/main/java/nuc/ss/pojo/Hello.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | public class Hello { 4 | private String str; 5 | 6 | public String getStr() { 7 | return str; 8 | } 9 | 10 | public void setStr(String str) { 11 | this.str = str; 12 | } 13 | 14 | @Override 15 | public String toString() { 16 | return "Hello{" + 17 | "str='" + str + '\'' + 18 | '}'; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/main/java/nuc/ss/log/AfterLog.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.log; 2 | 3 | import org.springframework.aop.AfterReturningAdvice; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | //returnValue:返回值 8 | public class AfterLog implements AfterReturningAdvice { 9 | public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable { 10 | System.out.println("执行了" + method.getName() + "方法,返回的结果为:" + returnValue); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/java/nuc/ss/mapper/UserMapperImpl2.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.mapper; 2 | 3 | import nuc.ss.pojo.User; 4 | import org.mybatis.spring.support.SqlSessionDaoSupport; 5 | 6 | import java.util.List; 7 | 8 | public class UserMapperImpl2 extends SqlSessionDaoSupport implements UserMapper { 9 | public List selectUser() { 10 | UserMapper mapper = getSqlSession().getMapper(UserMapper.class); 11 | return mapper.selectUser(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/src/main/java/nuc/ss/pojo/User.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | public class User { 4 | private String name; 5 | 6 | public User(String name) { 7 | this.name = name; 8 | 9 | } 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | 19 | public void show() { 20 | System.out.println("name = " + name); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/src/main/java/nuc/ss/pojo/UserT.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | public class UserT { 4 | private String name; 5 | 6 | public UserT() { 7 | System.out.println("UserT被创建了"); 8 | } 9 | 10 | public String getName() { 11 | return name; 12 | } 13 | 14 | public void setName(String name) { 15 | this.name = name; 16 | } 17 | 18 | public void show() { 19 | System.out.println("name = " + name); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/main/java/nuc/ss/log/Log.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.log; 2 | 3 | import org.springframework.aop.MethodBeforeAdvice; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | public class Log implements MethodBeforeAdvice { 8 | //method: 要执行的目标对象的方法 9 | //objects:多参 10 | //target:目标对象 11 | public void before(Method method, Object[] objects, Object target) throws Throwable { 12 | System.out.println(target.getClass().getName() + "的" + method.getName() + "被执行了"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/src/main/java/nuc/ss/pojo/Address.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | public class Address { 4 | private String address; 5 | 6 | public String getAddress() { 7 | return address; 8 | } 9 | 10 | public void setAddress(String address) { 11 | this.address = address; 12 | } 13 | 14 | @Override 15 | public String toString() { 16 | return "Address{" + 17 | "address='" + address + '\'' + 18 | '}'; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo03/Client.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo03; 2 | 3 | public class Client { 4 | public static void main(String[] args) { 5 | //真实角色 6 | Host host = new Host(); 7 | 8 | //代理角色,现在没有 9 | ProxyInvocationHandler pih = new ProxyInvocationHandler(); 10 | //通过调用程序处理角色来处理我们要用的接口 11 | pih.setRent(host); 12 | 13 | Rent proxy = (Rent)pih.getProxy();//这里的Proxy就是动态生成的,我们并没有写 14 | 15 | proxy.rent(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/main/java/nuc/ss/service/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.service; 2 | 3 | public class UserServiceImpl implements UserService { 4 | public void add() { 5 | System.out.println("增加了一个用户"); 6 | } 7 | 8 | public void delete() { 9 | System.out.println("删除了一个用户"); 10 | } 11 | 12 | public void update() { 13 | System.out.println("修改了一个用户"); 14 | } 15 | 16 | public void select() { 17 | System.out.println("查询了一个用户"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.pojo.User; 2 | import org.junit.Test; 3 | import org.springframework.context.ApplicationContext; 4 | import org.springframework.context.support.ClassPathXmlApplicationContext; 5 | 6 | public class MyTest { 7 | @Test 8 | public void test() { 9 | ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml"); 10 | User user = applicationContext.getBean("user", User.class); 11 | 12 | System.out.println(user.name); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-04-di 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-01-ioc 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-03-ioc2 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-06-anno 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-08-proxy 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/src/main/java/nuc/ss/pojo/User.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.context.annotation.Scope; 5 | import org.springframework.stereotype.Component; 6 | 7 | // 等价于 8 | @Component 9 | @Scope("singleton") 10 | public class User { 11 | public String name; 12 | 13 | //相当于 14 | @Value("狂神") 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Spring-Study/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Spring-Study/spring-02-hellospring/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.pojo.Hello; 2 | import org.springframework.context.ApplicationContext; 3 | import org.springframework.context.support.ClassPathXmlApplicationContext; 4 | 5 | public class MyTest { 6 | public static void main(String[] args) { 7 | // 获取Spring的上下文对象 8 | ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml"); 9 | //我们的对象现在都在Spring中管理了,我们要使用,直接去里面取出来就可以 10 | Hello hello = (Hello)context.getBean("hello"); 11 | System.out.println(hello); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Spring-Study/spring-05-autowired/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-05-autowired 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-05-autowired/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.pojo.People; 2 | import org.junit.Test; 3 | import org.springframework.context.ApplicationContext; 4 | import org.springframework.context.support.ClassPathXmlApplicationContext; 5 | 6 | public class MyTest { 7 | @Test 8 | public void test1() { 9 | ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml"); 10 | 11 | People people = context.getBean("people", People.class); 12 | 13 | people.getDog().shout(); 14 | people.getCat().shout(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Spring-Study/spring-07-appconfig/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-07-appconfig 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-02-hellospring/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-02-hellospring 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo04/Client.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo04; 2 | 3 | import nuc.ss.demo02.UserService; 4 | import nuc.ss.demo02.UserServiceImpl; 5 | 6 | public class Client { 7 | public static void main(String[] args) { 8 | //真实角色 9 | UserServiceImpl userService = new UserServiceImpl(); 10 | 11 | //代理角色,不存在 12 | ProxyInvocationHandler pih = new ProxyInvocationHandler(); 13 | 14 | //设置要代理的对象 15 | pih.setTarget(userService); 16 | 17 | //动态生成代理类 18 | UserService proxy = (UserService)pih.getProxy(); 19 | 20 | proxy.add(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.service.UserService; 2 | import nuc.ss.service.UserServiceImpl; 3 | import org.junit.Test; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | public class MyTest { 8 | @Test 9 | public void test1() { 10 | ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); 11 | 12 | // 动态代理代理的是接口! 注意点 13 | UserService userService = (UserService)context.getBean("userService"); 14 | 15 | userService.add(); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Spring-Study/note.md: -------------------------------------------------------------------------------- 1 | ## 常用依赖 2 | ```xml 3 | 4 | 5 | org.springframework 6 | spring-webmvc 7 | 5.2.7.RELEASE 8 | 9 | 10 | 11 | junit 12 | junit 13 | 4.12 14 | 15 | 16 | 17 | ``` 18 | 19 | ## 注解说明 20 | - @Autowired:自动装配通过类型、名字 21 | - 如果Autowired不能唯一自动装配上属性,则需要通过@Qualifilter(value="xxx") 22 | - @Nullable:字段标记了这个注解,说明这个字段可以为null 23 | - @Resource:自动装配通过名字、类型 24 | - @Component:组件,放在类上,说明这个类被Spring管理了,就是Bean! -------------------------------------------------------------------------------- /Spring-Study/spring-07-appconfig/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.config.MyConfig; 2 | import nuc.ss.pojo.User; 3 | import org.junit.Test; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.annotation.AnnotationConfigApplicationContext; 6 | 7 | public class MyTest { 8 | @Test 9 | public void test1() { 10 | // 如果完全使用了配置类的方式去做,我们就只能通过AnnotationContext 上下文来获取容器,通过配置类的class对象加载! 11 | ApplicationContext context = new AnnotationConfigApplicationContext(MyConfig.class); 12 | 13 | User getUser = context.getBean("user", User.class); 14 | 15 | System.out.println(getUser.getName()); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/java/nuc/ss/mapper/UserMapperImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.mapper; 2 | 3 | import nuc.ss.pojo.User; 4 | import org.mybatis.spring.SqlSessionTemplate; 5 | 6 | import java.util.List; 7 | 8 | public class UserMapperImpl implements UserMapper { 9 | 10 | //我们的所有操作,在原来都是用sqlSession来执行,现在都是用sqlSessionTemplate; 11 | private SqlSessionTemplate sqlSession; 12 | 13 | public void setSqlSession(SqlSessionTemplate sqlSession) { 14 | this.sqlSession = sqlSession; 15 | } 16 | 17 | public List selectUser() { 18 | UserMapper mapper = sqlSession.getMapper(UserMapper.class); 19 | return mapper.selectUser(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/java/nuc/ss/service/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.service; 2 | 3 | import nuc.ss.dao.UserDao; 4 | import nuc.ss.dao.UserDaoMysqlImpl; 5 | import nuc.ss.dao.UserDaoOracleImpl; 6 | 7 | public class UserServiceImpl implements UserService { 8 | //private UserDao userDao = new UserDaoImpl(); 9 | //private UserDao userDao = new UserDaoMysqlImpl(); 10 | //private UserDao userDao = new UserDaoOracleImpl(); 11 | 12 | private UserDao userDao; 13 | 14 | // 利用set进行动态实现值的注入 15 | public void setUserDao(UserDao userDao) { 16 | this.userDao = userDao; 17 | } 18 | 19 | public void getUser() { 20 | userDao.getUser(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Spring-Study/spring-07-appconfig/src/main/java/nuc/ss/pojo/User.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.stereotype.Component; 5 | 6 | //这里这个注解的意思,就是说明这个类被Spring接管了,注解到了容器中 7 | @Component 8 | public class User { 9 | private String name; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | //属性注入值 16 | @Value("狂神") 17 | public void setName(String name) { 18 | this.name = name; 19 | } 20 | 21 | @Override 22 | public String toString() { 23 | return "User{" + 24 | "name='" + name + '\'' + 25 | '}'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/src/main/java/nuc/ss/pojo/User.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | public class User { 4 | private String name; 5 | private int age; 6 | 7 | public void setName(String name) { 8 | this.name = name; 9 | } 10 | 11 | public void setAge(int age) { 12 | this.age = age; 13 | } 14 | 15 | public User() { 16 | } 17 | 18 | public User(String name, int age) { 19 | this.name = name; 20 | this.age = age; 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "User{" + 26 | "name='" + name + '\'' + 27 | ", age=" + age + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Spring-Study/spring-06-anno/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/main/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-02-hellospring/src/main/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/src/main/resources/UserBeans.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo01/Proxy.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo01; 2 | 3 | public class Proxy implements Rent { 4 | private Host host; 5 | 6 | public Proxy() { 7 | } 8 | 9 | public Proxy(Host host) { 10 | this.host = host; 11 | } 12 | 13 | public void rent() { 14 | seeHouse(); 15 | fare(); 16 | contract(); 17 | host.rent(); 18 | } 19 | 20 | //看房 21 | public void seeHouse() { 22 | System.out.println("中介带你看房"); 23 | } 24 | 25 | //收中介费 26 | public void fare() { 27 | System.out.println("收中介费"); 28 | } 29 | 30 | //收中介费 31 | public void contract() { 32 | System.out.println("签租赁合同"); 33 | } 34 | } -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/main/java/nuc/ss/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | insert into mybatis.user (id, name, pwd) values (#{id}, #{name}, #{pwd}); 14 | 15 | 16 | 17 | delete from mybatis.user where id = #{id}; 18 | 19 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.mapper.UserMapper; 2 | import nuc.ss.pojo.User; 3 | import org.junit.Test; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | import java.util.List; 8 | 9 | public class MyTest { 10 | @Test 11 | public void test(){ 12 | ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); 13 | 14 | UserMapper userMapper = context.getBean("userMapper2", UserMapper.class); 15 | 16 | List users = userMapper.selectUser(); 17 | 18 | for (User user : users) { 19 | System.out.println(user); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo02/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo02; 2 | 3 | //真实对象 4 | public class UserServiceImpl implements UserService { 5 | public void add() { 6 | //System.out.println("使用了add方法"); 7 | System.out.println("增加了一个用户"); 8 | } 9 | 10 | public void delete() { 11 | //System.out.println("使用了delete方法"); 12 | System.out.println("删除了一个用户"); 13 | } 14 | 15 | public void update() { 16 | //System.out.println("使用了update方法"); 17 | System.out.println("修改了一个用户"); 18 | } 19 | 20 | public void query() { 21 | //System.out.println("使用了query方法"); 22 | System.out.println("查询了一个用户"); 23 | } 24 | 25 | // 1.改动原有的业务代码,在公司中是大忌! 26 | } 27 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.mapper.UserMapper; 2 | import nuc.ss.pojo.User; 3 | import org.junit.Test; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | import java.util.List; 8 | 9 | public class MyTest { 10 | @Test 11 | public void test() { 12 | ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); 13 | 14 | UserMapper userMapper = context.getBean("userMapper", UserMapper.class); 15 | 16 | List users = userMapper.selectUser(); 17 | 18 | for (User user : users) { 19 | System.out.println(user); 20 | } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-09-aop 13 | 14 | 15 | 16 | org.aspectj 17 | aspectjweaver 18 | 1.9.4 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Spring-Study/spring-07-appconfig/src/main/java/nuc/ss/config/MyConfig.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.config; 2 | 3 | import nuc.ss.pojo.User; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.ComponentScan; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.context.annotation.Import; 8 | 9 | //这个也被Spring容器托管,注册到容器里,因为他本来就是一个@Component, 10 | //@Component代表这是一个配置类,就和我们之前看的beans.xml是一样的 11 | @Configuration 12 | @ComponentScan("nuc.ss.pojo") 13 | @Import(MyConfig2.class) 14 | public class MyConfig { 15 | 16 | //注册一个bean,就相当于我们之前写的一个bean标签, 17 | //这个方法的名字就相当于bean标签的id属性 18 | //这个方法的返回值,就相当于bean标签中的class属性 19 | @Bean 20 | public User user() { 21 | return new User();//就是要返回注入到bean的对象! 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo02/UserServiceProxy.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo02; 2 | 3 | public class UserServiceProxy implements UserService { 4 | private UserService userService; 5 | 6 | public void setUserService(UserService userService) { 7 | this.userService = userService; 8 | } 9 | 10 | public void add() { 11 | log("add"); 12 | userService.add(); 13 | } 14 | 15 | public void delete() { 16 | log("delete"); 17 | userService.delete(); 18 | } 19 | 20 | public void update() { 21 | log("update"); 22 | userService.update(); 23 | } 24 | 25 | public void query() { 26 | log("query"); 27 | userService.query(); 28 | } 29 | 30 | //日志方法 31 | private void log(String msg) { 32 | System.out.println("使用了" + msg + "方法"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Spring-Study/.idea/dataSources.local.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #@ 7 | ` 8 | 9 | 10 | master_key 11 | root 12 | *:mybatis 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.pojo.Student; 2 | import nuc.ss.pojo.User; 3 | import org.junit.Test; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | public class MyTest { 8 | public static void main(String[] args) { 9 | ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml"); 10 | Student student = (Student)context.getBean("student"); 11 | System.out.println(student); 12 | } 13 | 14 | @Test 15 | public void test() { 16 | ApplicationContext context = new ClassPathXmlApplicationContext("userBeans.xml"); 17 | //User user = (User)context.getBean("user"); 18 | User user = context.getBean("user", User.class); 19 | User user2 = context.getBean("user", User.class); 20 | System.out.println(user == user2); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/main/java/nuc/ss/mapper/UserMapperImpl.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.mapper; 2 | 3 | import nuc.ss.pojo.User; 4 | import org.mybatis.spring.support.SqlSessionDaoSupport; 5 | 6 | import java.util.List; 7 | import java.util.UUID; 8 | 9 | public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper { 10 | 11 | public List selectUser() { 12 | User user = new User(7, "小王", "13654"); 13 | 14 | UserMapper mapper = getSqlSession().getMapper(UserMapper.class); 15 | 16 | mapper.addUser(user); 17 | mapper.deleteUser(user.getId()); 18 | return mapper.selectUser(); 19 | } 20 | 21 | public int addUser(User user) { 22 | return getSqlSession().getMapper(UserMapper.class).addUser(user); 23 | } 24 | 25 | public int deleteUser(int id) { 26 | return getSqlSession().getMapper(UserMapper.class).deleteUser(id); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.pojo.User; 2 | import nuc.ss.pojo.UserT; 3 | import org.springframework.context.ApplicationContext; 4 | import org.springframework.context.support.ClassPathXmlApplicationContext; 5 | 6 | public class MyTest { 7 | public static void main(String[] args) { 8 | 9 | //Spring容器,类似于婚介网站 10 | //ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml"); 11 | 12 | //User user = (User)context.getBean("user"); 13 | //别名 14 | //User user = (User)context.getBean("userNew"); 15 | 16 | //创建同一个对象 17 | /*User user2 = (User)context.getBean("user"); 18 | System.out.println(user == user2);*/ 19 | 20 | //user.show(); 21 | 22 | 23 | ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml"); 24 | 25 | UserT userT = (UserT) applicationContext.getBean("t2"); 26 | userT.show(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Spring-Study/spring-01-ioc1/src/test/java/MyTest.java: -------------------------------------------------------------------------------- 1 | import nuc.ss.dao.UserDaoMysqlImpl; 2 | import nuc.ss.service.UserService; 3 | import nuc.ss.service.UserServiceImpl; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | public class MyTest { 8 | public static void main(String[] args) { 9 | // 之前代码 10 | //用户实际调用的是业务层,dao层他们不需要调用 11 | 12 | /*UserService userService = new UserServiceImpl(); 13 | ((UserServiceImpl)userService).setUserDao(new UserDaoMysqlImpl()); 14 | userService.getUser();*/ 15 | 16 | // Spring改进后的代码 17 | // 获取ApplicationContext:拿到Spring的容器 18 | ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml"); 19 | 20 | //容器在手,天下我有,需要什么,就直接get什么 21 | UserServiceImpl userServiceImpl = (UserServiceImpl)applicationContext.getBean("UserServiceImpl"); 22 | 23 | userServiceImpl.getUser(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Spring-Study/.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | mysql.8 6 | true 7 | com.mysql.cj.jdbc.Driver 8 | jdbc:mysql://localhost:3306 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Spring-Study/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo04/ProxyInvocationHandler.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo04; 2 | 3 | import nuc.ss.demo03.Rent; 4 | 5 | import java.lang.reflect.InvocationHandler; 6 | import java.lang.reflect.Method; 7 | import java.lang.reflect.Proxy; 8 | 9 | //等会我门会用这个类,自动生成代理类 10 | public class ProxyInvocationHandler implements InvocationHandler { 11 | 12 | //被代理的接口 13 | private Object target; 14 | 15 | public void setTarget(Object target) { 16 | this.target = target; 17 | } 18 | 19 | //生成代理对象 20 | public Object getProxy() { 21 | return Proxy.newProxyInstance(this.getClass().getClassLoader(),target.getClass().getInterfaces(),this); 22 | } 23 | 24 | //处理代理实例,并返回结果 25 | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { 26 | log(method.getName()); 27 | //动态代理的本质,就是使用反射机制 28 | return method.invoke(target, args); 29 | } 30 | 31 | //日志方法 32 | private void log(String msg) { 33 | System.out.println("使用了" + msg + "方法"); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Spring-Study/spring-08-proxy/src/main/java/nuc/ss/demo03/ProxyInvocationHandler.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.demo03; 2 | 3 | import java.lang.reflect.InvocationHandler; 4 | import java.lang.reflect.Method; 5 | import java.lang.reflect.Proxy; 6 | 7 | //等会我门会用这个类,自动生成代理类 8 | public class ProxyInvocationHandler implements InvocationHandler { 9 | 10 | //被代理的接口 11 | private Rent rent; 12 | 13 | public void setRent(Rent rent) { 14 | this.rent = rent; 15 | } 16 | 17 | //生成代理对象 18 | public Object getProxy() { 19 | return Proxy.newProxyInstance(this.getClass().getClassLoader(),rent.getClass().getInterfaces(),this); 20 | } 21 | //处理代理实例,并返回结果 22 | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { 23 | //动态代理的本质,就是使用反射机制 24 | seeHouse(); 25 | Object result = method.invoke(rent, args); 26 | fare(); 27 | return result; 28 | } 29 | 30 | public void seeHouse() { 31 | System.out.println("中介带看房子"); 32 | } 33 | 34 | public void fare() { 35 | System.out.println("收中介费"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Spring-Study/spring-05-autowired/src/main/java/nuc/ss/pojo/People.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.beans.factory.annotation.Qualifier; 5 | 6 | import javax.annotation.Resource; 7 | 8 | public class People { 9 | //@Autowired 10 | //@Qualifier(value = "cat11") 11 | 12 | @Resource(name = "cat1") 13 | private Cat cat; 14 | //@Autowired 15 | //@Qualifier(value="dog222") 16 | 17 | @Resource 18 | private Dog dog; 19 | private String name; 20 | 21 | public Cat getCat() { 22 | return cat; 23 | } 24 | 25 | public void setCat(Cat cat) { 26 | this.cat = cat; 27 | } 28 | 29 | public Dog getDog() { 30 | return dog; 31 | } 32 | 33 | public void setDog(Dog dog) { 34 | this.dog = dog; 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public void setName(String name) { 42 | this.name = name; 43 | } 44 | 45 | @Override 46 | public String toString() { 47 | return "People{" + 48 | "cat=" + cat + 49 | ", dog=" + dog + 50 | ", name='" + name + '\'' + 51 | '}'; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/main/java/nuc/ss/diy/AnnotationPointCut.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.diy; 2 | 3 | import org.aspectj.lang.ProceedingJoinPoint; 4 | import org.aspectj.lang.Signature; 5 | import org.aspectj.lang.annotation.After; 6 | import org.aspectj.lang.annotation.Around; 7 | import org.aspectj.lang.annotation.Aspect; 8 | import org.aspectj.lang.annotation.Before; 9 | 10 | //方式三:使用注解的方式实现AOP 11 | @Aspect//标注这个类是一个切面 12 | public class AnnotationPointCut { 13 | @Before("execution(* nuc.ss.service.UserServiceImpl.*(..))") 14 | public void before() { 15 | System.out.println("==========方法执行前============"); 16 | } 17 | 18 | @After("execution(* nuc.ss.service.UserServiceImpl.*(..))") 19 | public void after() { 20 | System.out.println("==========方法执行后============"); 21 | } 22 | 23 | //在环绕增强中,我们可以给定一个参数,代表我们要获取处理切入的点 24 | @Around("execution(* nuc.ss.service.UserServiceImpl.*(..))") 25 | public void around(ProceedingJoinPoint jp) throws Throwable { 26 | System.out.println("==========环绕前============"); 27 | 28 | //获取签名 29 | //Signature signature = jp.getSignature(); 30 | //System.out.println("signature:" + signature); 31 | 32 | //执行方法 33 | Object proceed = jp.proceed(); 34 | 35 | System.out.println("==========环绕后============"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/src/main/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/src/main/resources/beans2.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Spring-Study/spring-03-ioc2/src/main/resources/beans3.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Spring-Study/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | nuc.ss 8 | Spring-Study 9 | pom 10 | 1.0-SNAPSHOT 11 | 12 | spring-01-ioc1 13 | spring-02-hellospring 14 | spring-03-ioc2 15 | spring-04-di 16 | spring-05-autowired 17 | spring-06-anno 18 | spring-07-appconfig 19 | spring-08-proxy 20 | spring-09-aop 21 | spring-10-mybatis 22 | spring-11-transaction 23 | 24 | 25 | 26 | 27 | 28 | 29 | org.springframework 30 | spring-webmvc 31 | 5.2.7.RELEASE 32 | 33 | 34 | 35 | junit 36 | junit 37 | 4.12 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Spring-Study/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /Spring-Study/spring-05-autowired/src/main/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 15 | 16 | 17 | 22 | 23 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/src/main/resources/spring-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Spring-Study/spring-09-aop/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/src/main/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 红楼梦 21 | 西游记 22 | 水浒传 23 | 三国演义 24 | 25 | 26 | 27 | 28 | 29 | 30 | 听歌 31 | 敲代码 32 | 看电影 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | LOL 48 | COC 49 | BOB 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | com.mysql.jdbc.Driver 62 | localhost://3306 63 | root 64 | admin 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Spring-Study/spring-04-di/src/main/java/nuc/ss/pojo/Student.java: -------------------------------------------------------------------------------- 1 | package nuc.ss.pojo; 2 | 3 | import java.util.*; 4 | 5 | public class Student { 6 | private String name; 7 | private Address address; 8 | private String[] books; 9 | private List hobbies; 10 | private Map card; 11 | private Set games; 12 | private String wife; 13 | private Properties info; 14 | 15 | public String getName() { 16 | return name; 17 | } 18 | 19 | public void setName(String name) { 20 | this.name = name; 21 | } 22 | 23 | public Address getAddress() { 24 | return address; 25 | } 26 | 27 | public void setAddress(Address address) { 28 | this.address = address; 29 | } 30 | 31 | public String[] getBooks() { 32 | return books; 33 | } 34 | 35 | public void setBooks(String[] books) { 36 | this.books = books; 37 | } 38 | 39 | public List getHobbies() { 40 | return hobbies; 41 | } 42 | 43 | public void setHobbies(List hobbies) { 44 | this.hobbies = hobbies; 45 | } 46 | 47 | public Map getCard() { 48 | return card; 49 | } 50 | 51 | public void setCard(Map card) { 52 | this.card = card; 53 | } 54 | 55 | public Set getGames() { 56 | return games; 57 | } 58 | 59 | public void setGames(Set games) { 60 | this.games = games; 61 | } 62 | 63 | public String getWife() { 64 | return wife; 65 | } 66 | 67 | public void setWife(String wife) { 68 | this.wife = wife; 69 | } 70 | 71 | public Properties getInfo() { 72 | return info; 73 | } 74 | 75 | public void setInfo(Properties info) { 76 | this.info = info; 77 | } 78 | 79 | @Override 80 | public String toString() { 81 | return "Student{" + 82 | "name='" + name + '\'' + 83 | ", address=" + address.toString() + 84 | ", books=" + Arrays.toString(books) + 85 | ", hobbies=" + hobbies + 86 | ", card=" + card + 87 | ", games=" + games + 88 | ", wife='" + wife + '\'' + 89 | ", info=" + info + 90 | '}'; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-11-transaction 13 | 14 | 15 | 16 | 17 | junit 18 | junit 19 | 4.12 20 | 21 | 22 | 23 | mysql 24 | mysql-connector-java 25 | 5.1.46 26 | 27 | 28 | 29 | org.mybatis 30 | mybatis 31 | 3.5.2 32 | 33 | 34 | 35 | org.springframework 36 | spring-webmvc 37 | 5.2.7.RELEASE 38 | 39 | 40 | 41 | 42 | org.springframework 43 | spring-jdbc 44 | 5.2.7.RELEASE 45 | 46 | 47 | 48 | org.aspectj 49 | aspectjweaver 50 | 1.9.4 51 | 52 | 53 | 54 | org.mybatis 55 | mybatis-spring 56 | 2.0.2 57 | 58 | 59 | 60 | org.projectlombok 61 | lombok 62 | 1.16.10 63 | 64 | 65 | 66 | 67 | 68 | 69 | src/main/java 70 | 71 | **/*.properties 72 | **/*.xml 73 | 74 | true 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Spring-Study/spring-10-mybatis/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Spring-Study 7 | nuc.ss 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-10-mybatis 13 | 14 | 15 | 16 | 17 | junit 18 | junit 19 | 4.12 20 | 21 | 22 | 23 | mysql 24 | mysql-connector-java 25 | 5.1.46 26 | 27 | 28 | 29 | org.mybatis 30 | mybatis 31 | 3.5.2 32 | 33 | 34 | 35 | org.springframework 36 | spring-webmvc 37 | 5.2.7.RELEASE 38 | 39 | 40 | 41 | 42 | org.springframework 43 | spring-jdbc 44 | 5.2.7.RELEASE 45 | 46 | 47 | 48 | 49 | org.aspectj 50 | aspectjweaver 51 | 1.9.4 52 | 53 | 54 | 55 | org.mybatis 56 | mybatis-spring 57 | 2.0.2 58 | 59 | 60 | 61 | org.projectlombok 62 | lombok 63 | 1.16.10 64 | 65 | 66 | 67 | 68 | 69 | 70 | src/main/java 71 | 72 | **/*.properties 73 | **/*.xml 74 | 75 | true 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Spring-Study/spring-11-transaction/src/main/resources/spring-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Spring-Study/.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /Spring-Study/.idea/dataSources/b305dbe5-0b75-41da-9b2b-3b4bc6eeb2c2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 5.5.62 6 | InnoDB 7 | InnoDB 8 | lower/lower 9 | 10 | 11 | 1 12 | utf8_general_ci 13 | 14 | 15 | utf8_general_ci 16 | 17 | 18 | utf8_general_ci 19 | 20 | 21 | utf8_general_ci 22 | 23 | 24 | utf8_general_ci 25 | 26 | 27 | utf8_general_ci 28 | 29 | 30 | utf8_general_ci 31 | 32 | 33 | utf8_general_ci 34 | 35 | 36 | utf8_general_ci 37 | 38 | 39 | 1 40 | utf8_general_ci 41 | 42 | 43 | gb2312_chinese_ci 44 | 45 | 46 | latin1_swedish_ci 47 | 48 | 49 | utf8_general_ci 50 | 51 | 52 | utf8_general_ci 53 | 54 | 55 | utf8_general_ci 56 | 57 | 58 | utf8_general_ci 59 | 60 | 61 | latin1_swedish_ci 62 | 63 | 64 | utf8_general_ci 65 | 66 | 67 | utf8_general_ci 68 | 69 | 70 | utf8_general_ci 71 | 72 | 73 | armscii8 74 | 0 75 | 76 | 77 | armscii8 78 | 1 79 | 80 | 81 | ascii 82 | 0 83 | 84 | 85 | ascii 86 | 1 87 | 88 | 89 | big5 90 | 0 91 | 92 | 93 | big5 94 | 1 95 | 96 | 97 | binary 98 | 1 99 | 100 | 101 | cp1250 102 | 0 103 | 104 | 105 | cp1250 106 | 0 107 | 108 | 109 | cp1250 110 | 0 111 | 112 | 113 | cp1250 114 | 1 115 | 116 | 117 | cp1250 118 | 0 119 | 120 | 121 | cp1251 122 | 0 123 | 124 | 125 | cp1251 126 | 0 127 | 128 | 129 | cp1251 130 | 1 131 | 132 | 133 | cp1251 134 | 0 135 | 136 | 137 | cp1251 138 | 0 139 | 140 | 141 | cp1256 142 | 0 143 | 144 | 145 | cp1256 146 | 1 147 | 148 | 149 | cp1257 150 | 0 151 | 152 | 153 | cp1257 154 | 1 155 | 156 | 157 | cp1257 158 | 0 159 | 160 | 161 | cp850 162 | 0 163 | 164 | 165 | cp850 166 | 1 167 | 168 | 169 | cp852 170 | 0 171 | 172 | 173 | cp852 174 | 1 175 | 176 | 177 | cp866 178 | 0 179 | 180 | 181 | cp866 182 | 1 183 | 184 | 185 | cp932 186 | 0 187 | 188 | 189 | cp932 190 | 1 191 | 192 | 193 | dec8 194 | 0 195 | 196 | 197 | dec8 198 | 1 199 | 200 | 201 | eucjpms 202 | 0 203 | 204 | 205 | eucjpms 206 | 1 207 | 208 | 209 | euckr 210 | 0 211 | 212 | 213 | euckr 214 | 1 215 | 216 | 217 | gb2312 218 | 0 219 | 220 | 221 | gb2312 222 | 1 223 | 224 | 225 | gbk 226 | 0 227 | 228 | 229 | gbk 230 | 1 231 | 232 | 233 | geostd8 234 | 0 235 | 236 | 237 | geostd8 238 | 1 239 | 240 | 241 | greek 242 | 0 243 | 244 | 245 | greek 246 | 1 247 | 248 | 249 | hebrew 250 | 0 251 | 252 | 253 | hebrew 254 | 1 255 | 256 | 257 | hp8 258 | 0 259 | 260 | 261 | hp8 262 | 1 263 | 264 | 265 | keybcs2 266 | 0 267 | 268 | 269 | keybcs2 270 | 1 271 | 272 | 273 | koi8r 274 | 0 275 | 276 | 277 | koi8r 278 | 1 279 | 280 | 281 | koi8u 282 | 0 283 | 284 | 285 | koi8u 286 | 1 287 | 288 | 289 | latin1 290 | 0 291 | 292 | 293 | latin1 294 | 0 295 | 296 | 297 | latin1 298 | 0 299 | 300 | 301 | latin1 302 | 0 303 | 304 | 305 | latin1 306 | 0 307 | 308 | 309 | latin1 310 | 0 311 | 312 | 313 | latin1 314 | 0 315 | 316 | 317 | latin1 318 | 1 319 | 320 | 321 | latin2 322 | 0 323 | 324 | 325 | latin2 326 | 0 327 | 328 | 329 | latin2 330 | 0 331 | 332 | 333 | latin2 334 | 1 335 | 336 | 337 | latin2 338 | 0 339 | 340 | 341 | latin5 342 | 0 343 | 344 | 345 | latin5 346 | 1 347 | 348 | 349 | latin7 350 | 0 351 | 352 | 353 | latin7 354 | 0 355 | 356 | 357 | latin7 358 | 1 359 | 360 | 361 | latin7 362 | 0 363 | 364 | 365 | macce 366 | 0 367 | 368 | 369 | macce 370 | 1 371 | 372 | 373 | macroman 374 | 0 375 | 376 | 377 | macroman 378 | 1 379 | 380 | 381 | sjis 382 | 0 383 | 384 | 385 | sjis 386 | 1 387 | 388 | 389 | swe7 390 | 0 391 | 392 | 393 | swe7 394 | 1 395 | 396 | 397 | tis620 398 | 0 399 | 400 | 401 | tis620 402 | 1 403 | 404 | 405 | ucs2 406 | 0 407 | 408 | 409 | ucs2 410 | 0 411 | 412 | 413 | ucs2 414 | 0 415 | 416 | 417 | ucs2 418 | 0 419 | 420 | 421 | ucs2 422 | 0 423 | 424 | 425 | ucs2 426 | 1 427 | 428 | 429 | ucs2 430 | 0 431 | 432 | 433 | ucs2 434 | 0 435 | 436 | 437 | ucs2 438 | 0 439 | 440 | 441 | ucs2 442 | 0 443 | 444 | 445 | ucs2 446 | 0 447 | 448 | 449 | ucs2 450 | 0 451 | 452 | 453 | ucs2 454 | 0 455 | 456 | 457 | ucs2 458 | 0 459 | 460 | 461 | ucs2 462 | 0 463 | 464 | 465 | ucs2 466 | 0 467 | 468 | 469 | ucs2 470 | 0 471 | 472 | 473 | ucs2 474 | 0 475 | 476 | 477 | ucs2 478 | 0 479 | 480 | 481 | ucs2 482 | 0 483 | 484 | 485 | ucs2 486 | 0 487 | 488 | 489 | ucs2 490 | 0 491 | 492 | 493 | ucs2 494 | 0 495 | 496 | 497 | ujis 498 | 0 499 | 500 | 501 | ujis 502 | 1 503 | 504 | 505 | utf16 506 | 0 507 | 508 | 509 | utf16 510 | 0 511 | 512 | 513 | utf16 514 | 0 515 | 516 | 517 | utf16 518 | 0 519 | 520 | 521 | utf16 522 | 0 523 | 524 | 525 | utf16 526 | 1 527 | 528 | 529 | utf16 530 | 0 531 | 532 | 533 | utf16 534 | 0 535 | 536 | 537 | utf16 538 | 0 539 | 540 | 541 | utf16 542 | 0 543 | 544 | 545 | utf16 546 | 0 547 | 548 | 549 | utf16 550 | 0 551 | 552 | 553 | utf16 554 | 0 555 | 556 | 557 | utf16 558 | 0 559 | 560 | 561 | utf16 562 | 0 563 | 564 | 565 | utf16 566 | 0 567 | 568 | 569 | utf16 570 | 0 571 | 572 | 573 | utf16 574 | 0 575 | 576 | 577 | utf16 578 | 0 579 | 580 | 581 | utf16 582 | 0 583 | 584 | 585 | utf16 586 | 0 587 | 588 | 589 | utf16 590 | 0 591 | 592 | 593 | utf32 594 | 0 595 | 596 | 597 | utf32 598 | 0 599 | 600 | 601 | utf32 602 | 0 603 | 604 | 605 | utf32 606 | 0 607 | 608 | 609 | utf32 610 | 0 611 | 612 | 613 | utf32 614 | 1 615 | 616 | 617 | utf32 618 | 0 619 | 620 | 621 | utf32 622 | 0 623 | 624 | 625 | utf32 626 | 0 627 | 628 | 629 | utf32 630 | 0 631 | 632 | 633 | utf32 634 | 0 635 | 636 | 637 | utf32 638 | 0 639 | 640 | 641 | utf32 642 | 0 643 | 644 | 645 | utf32 646 | 0 647 | 648 | 649 | utf32 650 | 0 651 | 652 | 653 | utf32 654 | 0 655 | 656 | 657 | utf32 658 | 0 659 | 660 | 661 | utf32 662 | 0 663 | 664 | 665 | utf32 666 | 0 667 | 668 | 669 | utf32 670 | 0 671 | 672 | 673 | utf32 674 | 0 675 | 676 | 677 | utf32 678 | 0 679 | 680 | 681 | utf8 682 | 0 683 | 684 | 685 | utf8 686 | 0 687 | 688 | 689 | utf8 690 | 0 691 | 692 | 693 | utf8 694 | 0 695 | 696 | 697 | utf8 698 | 0 699 | 700 | 701 | utf8 702 | 1 703 | 704 | 705 | utf8 706 | 0 707 | 708 | 709 | utf8 710 | 0 711 | 712 | 713 | utf8 714 | 0 715 | 716 | 717 | utf8 718 | 0 719 | 720 | 721 | utf8 722 | 0 723 | 724 | 725 | utf8 726 | 0 727 | 728 | 729 | utf8 730 | 0 731 | 732 | 733 | utf8 734 | 0 735 | 736 | 737 | utf8 738 | 0 739 | 740 | 741 | utf8 742 | 0 743 | 744 | 745 | utf8 746 | 0 747 | 748 | 749 | utf8 750 | 0 751 | 752 | 753 | utf8 754 | 0 755 | 756 | 757 | utf8 758 | 0 759 | 760 | 761 | utf8 762 | 0 763 | 764 | 765 | utf8 766 | 0 767 | 768 | 769 | utf8 770 | 0 771 | 772 | 773 | utf8mb4 774 | 0 775 | 776 | 777 | utf8mb4 778 | 0 779 | 780 | 781 | utf8mb4 782 | 0 783 | 784 | 785 | utf8mb4 786 | 0 787 | 788 | 789 | utf8mb4 790 | 0 791 | 792 | 793 | utf8mb4 794 | 1 795 | 796 | 797 | utf8mb4 798 | 0 799 | 800 | 801 | utf8mb4 802 | 0 803 | 804 | 805 | utf8mb4 806 | 0 807 | 808 | 809 | utf8mb4 810 | 0 811 | 812 | 813 | utf8mb4 814 | 0 815 | 816 | 817 | utf8mb4 818 | 0 819 | 820 | 821 | utf8mb4 822 | 0 823 | 824 | 825 | utf8mb4 826 | 0 827 | 828 | 829 | utf8mb4 830 | 0 831 | 832 | 833 | utf8mb4 834 | 0 835 | 836 | 837 | utf8mb4 838 | 0 839 | 840 | 841 | utf8mb4 842 | 0 843 | 844 | 845 | utf8mb4 846 | 0 847 | 848 | 849 | utf8mb4 850 | 0 851 | 852 | 853 | utf8mb4 854 | 0 855 | 856 | 857 | utf8mb4 858 | 0 859 | 860 | 861 |
862 |
863 |
864 | 865 | 1 866 | 博客id 867 | varchar(50)|0s 868 | 1 869 | normal 870 | 871 | 872 | 2 873 | 博客标题 874 | varchar(100)|0s 875 | 1 876 | normal 877 | 878 | 879 | 3 880 | 博客作者 881 | varchar(30)|0s 882 | 1 883 | normal 884 | 885 | 886 | 4 887 | 创建时间 888 | datetime|0s 889 | 1 890 | normal 891 | 892 | 893 | 5 894 | 浏览量 895 | int(30)|0s 896 | 1 897 | normal 898 | 899 | 900 | 1 901 | int(10)|0s 902 | 1 903 | normal 904 | 905 | 906 | 2 907 | varchar(30)|0s 908 | normal 909 | 910 | 911 | 3 912 | int(10)|0s 913 | normal 914 | 915 | 916 | tid 917 | btree 918 | 919 | 920 | 1 921 | id 922 | 1 923 | 924 | 925 | tid 926 | mybatis 927 | teacher 928 | id 929 | 930 | 931 | 1 932 | int(10)|0s 933 | 1 934 | normal 935 | 936 | 937 | 2 938 | varchar(30)|0s 939 | normal 940 | 941 | 942 | 1 943 | id 944 | 1 945 | 946 | 947 | 1 948 | int(20)|0s 949 | 1 950 | normal 951 | 952 | 953 | 2 954 | varchar(30)|0s 955 | normal 956 | 957 | 958 | 3 959 | varchar(30)|0s 960 | normal 961 | 962 | 963 | 1 964 | id 965 | 1 966 | 967 | 968 | -------------------------------------------------------------------------------- /Spring-Study/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 165 | 166 | 167 | 168 | 171 | 172 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 |