项目作者: sfwyly

项目描述 :
A simple MVC framework
高级语言: Java
项目地址: git://github.com/sfwyly/mini-mvc.git
创建时间: 2020-04-07T02:10:03Z
项目社区:https://github.com/sfwyly/mini-mvc

开源协议:

下载


mini-mvc

A simple MVC framework

Support

1.IOC
2.DispatcherServlet
3.AOP

Use

This mvc framework have a same use method as Spring mvc! But Different implementations!

Recently

ProceedingJointPoint Around advice

Examples

Around advice
```
@Component
@Aspect
public class SalaryAspect {

  1. @Around("org.wtu.jjj.controllers")
  2. public Object around(ProceedingJoinPoint pjp) throws InvocationTargetException, IllegalAccessException {
  3. System.out.println(" Before ");
  4. Object object = pjp.proceed();
  5. System.out.println(" After ");
  6. return object;
  7. }

}

  1. ## Details
  2. Our project maintains a mapping between the Aspect methods and the proxied methods.

public class AspectMethodToReflectMethod {

  1. private Class<?> aspect_cls;
  2. private Method aspect_method;
  3. private Class<?> reflect_cls;
  4. private List<Method> method_list;

}
```
This class is initialized when the framework starts.When executing the proxied method.First,check out the corresponding aspect method.Second,find out proxied method parameters and send to ProceedingJointPoint.Third,send ProceedingJointPoint to the parameter of aspect method.Finally,perform the faceted method by reflection.