Spring Boot Reference Guide
2.0.1.BUILD-SNAPSHOT Spring Boot v
Web Filters ....................................................................................................... 95
27.3. JAX-RS and Jersey .......................................................................................... 95
27.4. Embedded Servlet Container Support ................................................................ 97
Servlets, Filters, and listeners ............................................................................ 97
Registering Servlets, Filters, and Listeners as Spring Beans ........................ 97
Servlet Context Initialization .............................................................................. 98
Scanning for Servlets, Filters, and listeners ................................................ 98
The ServletWebServerApplicationContext .......................................................... 98
Customizing Embedded Servlet Containers ........................................................ 98
Programmatic Customization ..................................................................... 99
Customizing ConfigurableServletWebServerFactory Directly ........................ 99
JSP Limitations ............................................................................................... 100
28. Security .................................................................................................................... 101
28.1. MVC Security ................................................................................................. 101
28.2. WebFlux Security ........................................................................................... 102
28.3. OAuth2 .......................................................................................................... 102
Client .............................................................................................................. 102
28.4. Actuator Security ............................................................................................ 103
Cross Site Request Forgery Protection ............................................................ 104
29. Working with SQL Databases .................................................................................... 105
29.1. Configure a DataSource ................................................................................. 105
Embedded Database Support .......................................................................... 105
Connection to a Production Database .............................................................. 106
Connection to a JNDI DataSource ................................................................... 107
29.2. Using JdbcTemplate ....................................................................................... 107
29.3. JPA and “Spring Data” ................................................................................... 108
Entity Classes ................................................................................................. 108
Spring Data JPA Repositories ......................................................................... 109
Creating and Dropping JPA Databases ............................................................ 110
Open EntityManager in View ........................................................................... 110
29.4. Using H2’s Web Console ................................................................................ 110
Changing the H2 Console’s Path ..................................................................... 111
29.5. Using jOOQ ................................................................................................... 111
Code Generation ............................................................................................. 111
Using DSLContext ........................................................................................... 111
jOOQ SQL Dialect .......................................................................................... 112
Customizing jOOQ .......................................................................................... 112
30. Working with NoSQL Technologies ............................................................................ 113
30.1. Redis ............................................................................................................. 113
Connecting to Redis ........................................................................................ 113
30.2. MongoDB ....................................................................................................... 114
Connecting to a MongoDB Database ............................................................... 114
MongoTemplate .............................................................................................. 115
Spring Data MongoDB Repositories ................................................................. 115
Embedded Mongo ........................................................................................... 116
30.3. Neo4j ............................................................................................................. 116
Connecting to a Neo4j Database ..................................................................... 116
Using the Embedded Mode ............................................................................. 117
Neo4jSession .................................................................................................. 117
Spring Data Neo4j Repositories ....................................................................... 117