Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一直不明白没用aop 如何实现拦截注解实现功能 #1

Closed
leetomlee123 opened this issue Sep 3, 2018 · 2 comments
Closed
Labels
question Further information is requested

Comments

@leetomlee123
Copy link

飞机

@crossoverJie crossoverJie added the question Further information is requested label Sep 3, 2018
@crossoverJie
Copy link
Member

@leetomlee123 可以看看 Cicada 的实现。

https://github.com/crossoverJie/cicada/blob/0f1023859a09f76a0266db7f8fe47672105fbff9/cicada-core/src/main/java/top/crossoverjie/cicada/server/handle/HttpHandle.java#L62-L70

不过当前只实现了拦截默认 action。

Spring 这样的是根据 动态代理 实现的,Cicada 后续也会加入这样的特性,请持续关注。

@chenshun00
Copy link

chenshun00 commented Sep 3, 2018

@leetomlee123 Spring aop 也只是在方法的执行前添加了一个 List 列表而已,原理还是一致的,增加拦截器列表应该也有同样的效果,我也根据Spring的aop写了一个小小的动态代理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants