Spring Boot lets you externalize your configuration so that you can work with the same application code in different environments. You can use a variety of external configuration sources including Java properties files, YAML files, environment variables, and command-line arguments. Property values can be injected directly into your beans by using the @Value annotation, accessed through Spring’s Environment abstraction,…
MockMvc
MockMvc MockMvc is built on Servlet API mock implementations from the spring-test module and does not rely on a running container. Therefore, there are some differences when compared to full end-to-end integration tests with an actual client and a live server running. Alternatively, you may consider the full end-to-end integration testing support from Spring Boot with @SpringBootTest…
Spring Security III
URL and Examples
MVC Controller Method Params
MVC Controller Method Params
JPA Methods
JPA Methods
Transaction propagation and isolation
Transaction propagation and isolation
Spring JDBC
Spring JDBC
Spring Boot Auto-Configuration
Spring Boot Auto configuration definitions
Spring Resource interface
Spring’s Resource interface
JSR 330 Standard Annotations
JSR 330 Standard Annotations
Spring Aware Interfaces
Spring Aware Interfaces
Spring Transactions
Spring Transaction management
Spring Boot Core
MVC Rest
SpringBoot MVC Rest
Spring Boot JPA
Spring Boot JPA
Tests
Spring Test
Spring Actuator
Spring Actuator
Spring AOP
Spring AOP
JPA Pagination and Sorting
Spring data
Spring Data encapsulate multiple modules: Spring Data JPA Interfaces JDBC – Old java api.Spring JDBC – Spring abstraction to JDBC (JDBC Template)Spring Data JPA -Spring JPA supported implementation.Spring Data JDBC – New asynchronous implementationsR2BC – Reactive streams solution. Persistence Is the first-level cache where all entities are fetched from database or saved to, there are…
Spring MVC Entities
Annotations Name Description @Model Interface, holder for model attributes @ModelMap Class, in ModelMap attibute key can be omitted and the value of the attribute will be use to generate the key. @ModelAndView ModelAndView it’s a container for both View object and ModelMap @ModelAttribute Annotation that binds a method parameter or method return method to a…
Spring Security Entities
Spring Security Entities
Spring Security
Security concepts Architecture SecurityContextHolder – The SecurityContextHolder is where Spring Security stores the details of who is authenticated. SecurityContext – is obtained from the SecurityContextHolder and contains the Authentication of the currently authenticated user. Authentication – Can be the input to AuthenticationManager to provide the credentials a user has provided to authenticate or the current…
Spring Security II
Security filters Spring Security MVC is based on Server Filters. DelegatingFilterProxy – Filter implementation that allows bridging between servlet container lifecycle and ApplicationContext. This filter follows standard servlets containers mechanisms but delegates all work to a spring bean that implements filter. FilterChainProxy – special filter, provided by Spring Security that allows delegating to many filter…