bjmashibing / designpatterns Goto Github PK
View Code? Open in Web Editor NEW设计模式
设计模式
马老师,您能不能写的谨慎些,链表有环,初始化后,下一个节点又变成了自己,不能同过纯链表到头null值判断结尾了,您是我的偶像,可能设计模式不是为了表达这个,但是最好还是谨慎些,哈哈
马老师您好!
`Msg msg = new Msg();
msg.setMsg("大家好:),<script>,欢迎访问 mashibing.com ,大家都是996 ");
FilterChain fc = new FilterChain();
fc.add(new HTMLFilter())
.add(new SensitiveFilter());
FilterChain fc2 = new FilterChain();
fc2.add(new FaceFilter()).add(new URLFilter());
fc.add(fc2);
fc.doFilter(msg);
System.out.println(msg);`
看了javax文档,javax.servlet.FilterChain的定义跟您这边不一样,它是一个接口,并没有实现Filter,这样的话就不能将 fc2当成一个filter加入fc中了?javax设计的时候没有考虑这样的需求吗?
javax这样设计是为了方便Filter.doFilter再调用FilterChain.doFilter吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.