@@ -9130,13 +9130,14 @@ The following table lists features provided by the `BeanFactory` and
91309130| Yes
91319131|===
91329132
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:
91359135
91369136[source,java,indent=0]
91379137[subs="verbatim,quotes"]
91389138----
9139- ConfigurableBeanFactory factory = new XmlBeanFactory(...);
9139+ DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
9140+ // populate the factory with bean definitions
91409141
91419142 // now register any needed BeanPostProcessor instances
91429143 MyBeanPostProcessor postProcessor = new MyBeanPostProcessor();
@@ -9151,7 +9152,9 @@ implementation, you must write code like this:
91519152[source,java,indent=0]
91529153[subs="verbatim,quotes"]
91539154----
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"));
91559158
91569159 // bring in some property values from a Properties file
91579160 PropertyPlaceholderConfigurer cfg = new PropertyPlaceholderConfigurer();
@@ -30677,7 +30680,7 @@ also <<mvc-config-content-negotiation>> for content negotiation configuration.
3067730680
3067830681
3067930682[[mvc-ann-requestmapping-rfd]]
30680- ==== Suffix Suffix Pattern Matching and RFD
30683+ ==== Suffix Pattern Matching and RFD
3068130684
3068230685Reflected file download (RFD) attack was first described in a
3068330686https://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:
3071730720 For an example of how to do that with Spring see https://github.com/rwinch/spring-jackson-owasp[spring-jackson-owasp].
3071830721* Configure suffix pattern matching to be turned off or restricted to explicitly
3071930722 registered suffixes only.
30720- * Configure content negotiation with the properties “ useJaf” and “ignoreUknownPathExtension”
30723+ * Configure content negotiation with the properties " useJaf" and "ignoreUnknownPathExtensions"
3072130724 set to false which would result in a 406 response for URLs with unknown extensions.
3072230725 Note however that this may not be an option if URLs are naturally expected to have
3072330726 a dot towards the end.
@@ -47560,13 +47563,13 @@ default). Here you can see what methods are available for `Trigger` implementati
4756047563
4756147564Spring provides two implementations of the `Trigger` interface. The most interesting one
4756247565is 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
4756447567during the 9-to-5 "business hours" on weekdays.
4756547568
4756647569[source,java,indent=0]
4756747570[subs="verbatim"]
4756847571----
47569- scheduler.schedule(task, new CronTrigger("* 15 9-17 * * MON-FRI"));
47572+ scheduler.schedule(task, new CronTrigger("0 15 9-17 * * MON-FRI"));
4757047573----
4757147574
4757247575The 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
4757847581the `Trigger` abstraction. For example, it may be convenient to allow periodic triggers,
4757947582cron-based triggers, and even custom trigger implementations to be used interchangeably.
4758047583Such 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 .
4758247585
4758347586
4758447587
0 commit comments