上一页 1 2 3 4 5 6 7 ··· 12 下一页
摘要: 一:注解式的 二:非注解式的 三:两者通用的web.xml 阅读全文
posted @ 2019-10-15 16:16 我叫张小凡 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 一、(程序耦合) 所谓程序耦合,就是当结对开发的时候,一个人的代码结构,会使其开发进度被其他成员的代码进度所影响,这样会造成很大的危害。 举个例子:之前我在写普通的Java Web 程序时,我会在Service层直接调用Dao层的方法,那么 如果在开发一个大项目时,我只负责Service层,而别人负 阅读全文
posted @ 2019-09-27 22:03 我叫张小凡 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 即将之前的每个方法上的@before ()里大段的包名+类名+方法名做简化,定义一个@pointCut的方法,参数是之前其他注解的参数,然后在其他方法的注解参数中 调用该方法即可, 阅读全文
posted @ 2019-09-26 08:40 我叫张小凡 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 配置优先级十分简单,只需要在切面添加注解,@order(number)即可,参数越小,优先级越高 阅读全文
posted @ 2019-09-26 08:29 我叫张小凡 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1 package SpringAopImp; 2 3 public interface Calculator { 4 int add(int i, int j); 5 int sub(int i, int j); 6 int mul(int i, int j); 7 int div(int i, int j); 8 } 1 package Sprin... 阅读全文
posted @ 2019-09-25 11:27 我叫张小凡 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1 public interface Calculator { 2 int add(int i, int j); 3 int sub(int i, int j); 4 int mul(int i, int j); 5 int div(int i, int j); 6 } 1 public class CalculatorImp implements Ca... 阅读全文
posted @ 2019-09-24 13:23 我叫张小凡 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1 package SpringGenericDi; 2 3 import org.springframework.stereotype.Repository; 4 5 6 public class BaseRepository<T> { 7 8 9 } 1 package SpringGenericDi; 2 3 import org.springframework.beans.factory. 阅读全文
posted @ 2019-09-20 15:18 我叫张小凡 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1 package SpringAnnotation; 2 3 import org.springframework.stereotype.Component; 4 5 @Component("testObject") 6 public class TestObject { 7 8 } 1 package SpringAnnotation.service; 2 3 import SpringAnn 阅读全文
posted @ 2019-09-20 15:10 我叫张小凡 阅读(149) 评论(0) 推荐(0) 编辑
摘要: package SpringProperties; import org.springframework.context.support.ClassPathXmlApplicationContext; import javax.sql.DataSource; impo... 阅读全文
posted @ 2019-09-20 15:02 我叫张小凡 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1 package SpringBeansCycle; 2 3 public class Car { 4 private String brand; 5 6 public Car() { 7 System.out.println("我是一个构造器"); 8 } 9 10 public void init() { 11 System.out.println("this is a init!"); 1 阅读全文
posted @ 2019-09-20 15:00 我叫张小凡 阅读(671) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 12 下一页