Skip to content

Commit c47fbf7

Browse files
mojavelinuxrwinch
authored andcommitted
move code comment to callout
1 parent 879770a commit c47fbf7

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

docs/modules/ROOT/pages/servlet/architecture.adoc

+9-12
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,26 @@ The following listing shows pseudo code of `DelegatingFilterProxy`:
7171
.`DelegatingFilterProxy` Pseudo Code
7272
====
7373
.Java
74-
[source,java,role="primary",subs="+quotes,+macros"]
74+
[source,java,role="primary"]
7575
----
7676
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
77-
// Lazily get Filter that was registered as a Spring Bean
78-
// For the example in <<servlet-delegatingfilterproxy-figure>> `delegate` is an instance of __Bean Filter~0~__
79-
Filter delegate = getFilterBean(someBeanName);
80-
// delegate work to the Spring Bean
81-
delegate.doFilter(request, response);
77+
Filter delegate = getFilterBean(someBeanName); // <1>
78+
delegate.doFilter(request, response); // <2>
8279
}
8380
----
8481
8582
.Kotlin
86-
[source,kotlin,role="secondary",subs="+quotes,+macros"]
83+
[source,kotlin,role="secondary"]
8784
----
8885
fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) {
89-
// Lazily get Filter that was registered as a Spring Bean
90-
// For the example in <<servlet-delegatingfilterproxy-figure>> `delegate` is an instance of __Bean Filter~0~__
91-
val delegate: Filter = getFilterBean(someBeanName)
92-
// delegate work to the Spring Bean
93-
delegate.doFilter(request, response)
86+
val delegate: Filter = getFilterBean(someBeanName) // <1>
87+
delegate.doFilter(request, response) // <2>
9488
}
9589
----
9690
====
91+
<1> Lazily get Filter that was registered as a Spring Bean.
92+
For the example in <<servlet-delegatingfilterproxy-figure>> `delegate` is an instance of __Bean Filter~0~__.
93+
<2> Delegate work to the Spring Bean.
9794

9895
Another benefit of `DelegatingFilterProxy` is that it allows delaying looking up `Filter` bean instances.
9996
This is important because the container needs to register the `Filter` instances before the container can start up.

0 commit comments

Comments
 (0)