Skip to content

Spring Framework Blog

Menu
  • Home
  • Spring
  • Spring Boot
  • About
Menu

Category: Spring

Stereotypes

Posted on June 1, 2024June 2, 2024 by Armando Marques

Stereotypes are part of Spring annotations config, used with @ComponentScan. Annotations: @Components – is a generic stereotype for any Spring managed components. @Service – annotates classes at the service layer, code that holds business layer. @Repository – annotation used for classes from the persistence layer. Catches specific exceptions and re-throws them as Spring unified unchecked…

Proxies

Posted on May 31, 2024June 18, 2024 by Armando Marques

Type of proxies available in Spring: JDK Proxy CGLib proxy also called dynamic proxiescomes with JDKonly for Interfacesall interfaces are proxies extra lib included in Springcan intercept protected and public methodsused when interfaces are not availablecannot be applied to final classes or methodsused by Spring Boot Key JDK dynamic proxy CGLIB proxy Basic It can…

Bean Scopes

Posted on May 30, 2024June 1, 2024 by Armando Marques

Bean Scopes

Spring MVC Tests

Posted on May 29, 2024June 14, 2024 by Armando Marques

MVC Test framework Provide support for Spring MVC code, having requests processed through DispatcherServlet without container. It uses MockMvcRequestBuilders and MockMvcResultMatchers. Web environment types: DEFINED_PORT, MOCK, NONE, RANDOM_PORT. Default is Mock @LocalServerPort or @Value(“${local.server.port}”) to get test local port. TestRestTemplate Alternative to RestTemplate for integration tests. Slice testing Performs isolated testing within a slice of an application,…

Spring Exception Handler

Posted on January 30, 2024June 4, 2024 by Armando Marques

Error Handling for REST with Spring Before Spring 3.2 the two main approaches to handle exceptions where HandleExceptionResolver or @ExceptionHandler annotation. The it was added @ControllerAdvice and ResponseStatusException. Controller level (MVC) This strategy only works for active controllers is not global to the entire application. HandleExceptionResolver This is enabled by default in DispatchServlet. DefaultHandlerExceptionResolver Used…

Posts pagination

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • Next
  • Spring
  • Documentation
  • References
  • Toc
  • Books
  • Certification
  • AOP
  • Config
  • Java
  • Java core
  • JDBC
  • JPA
  • Rest
  • Security
  • Spring
  • Spring Boot
  • Spring Core
  • Spring Data
  • Spring MVC
  • Spring Rest
  • Spring Security
  • Tests
  • Transactions
  • Uncategorized

Recent Posts

  • Spring Annotations
  • Java Tests
  • Java operators
  • Java versions
  • Java Oracle Licenses
  • Configuration properties
  • MockMvc
  • Spring Security III
  • MVC Controller Method Params
  • JPA Methods
  • Transaction propagation and isolation
  • Spring JDBC
  • Spring Boot Auto-Configuration
  • Spring Resource interface
  • JSR 330 Standard Annotations
  • Spring Aware Interfaces
  • Spring Transactions
  • Spring Boot Core
  • MVC Rest
  • Spring Boot JPA
©2025 Spring Framework Blog | Built using WordPress and Responsive Blogily theme by Superb