@@ -9130,13 +9130,14 @@ The following table lists features provided by the `BeanFactory` and
9130
9130
| Yes
9131
9131
|===
9132
9132
9133
- To explicitly register a bean post-processor with a `BeanFactory` implementation, you
9134
- must write code like this:
9133
+ To explicitly register a bean post-processor with a `BeanFactory` implementation,
9134
+ you need to write code like this:
9135
9135
9136
9136
[source,java,indent=0]
9137
9137
[subs="verbatim,quotes"]
9138
9138
----
9139
- ConfigurableBeanFactory factory = new XmlBeanFactory(...);
9139
+ DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
9140
+ // populate the factory with bean definitions
9140
9141
9141
9142
// now register any needed BeanPostProcessor instances
9142
9143
MyBeanPostProcessor postProcessor = new MyBeanPostProcessor();
@@ -9151,7 +9152,9 @@ implementation, you must write code like this:
9151
9152
[source,java,indent=0]
9152
9153
[subs="verbatim,quotes"]
9153
9154
----
9154
- XmlBeanFactory factory = new XmlBeanFactory(new FileSystemResource("beans.xml"));
9155
+ DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
9156
+ XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);
9157
+ reader.loadBeanDefinitions(new FileSystemResource("beans.xml"));
9155
9158
9156
9159
// bring in some property values from a Properties file
9157
9160
PropertyPlaceholderConfigurer cfg = new PropertyPlaceholderConfigurer();
@@ -30677,7 +30680,7 @@ also <<mvc-config-content-negotiation>> for content negotiation configuration.
30677
30680
30678
30681
30679
30682
[[mvc-ann-requestmapping-rfd]]
30680
- ==== Suffix Suffix Pattern Matching and RFD
30683
+ ==== Suffix Pattern Matching and RFD
30681
30684
30682
30685
Reflected file download (RFD) attack was first described in a
30683
30686
https://www.trustwave.com/Resources/SpiderLabs-Blog/Reflected-File-Download---A-New-Web-Attack-Vector/[paper by Trustwave]
@@ -30717,7 +30720,7 @@ Below are additional recommendations from the report:
30717
30720
For an example of how to do that with Spring see https://github.com/rwinch/spring-jackson-owasp[spring-jackson-owasp].
30718
30721
* Configure suffix pattern matching to be turned off or restricted to explicitly
30719
30722
registered suffixes only.
30720
- * Configure content negotiation with the properties “ useJaf” and “ignoreUknownPathExtension”
30723
+ * Configure content negotiation with the properties " useJaf" and "ignoreUnknownPathExtensions"
30721
30724
set to false which would result in a 406 response for URLs with unknown extensions.
30722
30725
Note however that this may not be an option if URLs are naturally expected to have
30723
30726
a dot towards the end.
@@ -47560,13 +47563,13 @@ default). Here you can see what methods are available for `Trigger` implementati
47560
47563
47561
47564
Spring provides two implementations of the `Trigger` interface. The most interesting one
47562
47565
is the `CronTrigger`. It enables the scheduling of tasks based on cron expressions. For
47563
- example the following task is being scheduled to run 15 minutes past each hour but only
47566
+ example, the following task is being scheduled to run 15 minutes past each hour but only
47564
47567
during the 9-to-5 "business hours" on weekdays.
47565
47568
47566
47569
[source,java,indent=0]
47567
47570
[subs="verbatim"]
47568
47571
----
47569
- scheduler.schedule(task, new CronTrigger("* 15 9-17 * * MON-FRI"));
47572
+ scheduler.schedule(task, new CronTrigger("0 15 9-17 * * MON-FRI"));
47570
47573
----
47571
47574
47572
47575
The other out-of-the-box implementation is a `PeriodicTrigger` that accepts a fixed
@@ -47578,7 +47581,7 @@ fixed-delay, those methods should be used directly whenever possible. The value
47578
47581
the `Trigger` abstraction. For example, it may be convenient to allow periodic triggers,
47579
47582
cron-based triggers, and even custom trigger implementations to be used interchangeably.
47580
47583
Such a component could take advantage of dependency injection so that such `Triggers`
47581
- could be configured externally.
47584
+ could be configured externally and therefore easily modified or extended .
47582
47585
47583
47586
47584
47587
0 commit comments