Tagged articles
WebMvcConfigurer
13 articles · Page 1 of 1
This tutorial introduces SpringDoc as a modern replacement for SpringFox/Swagger UI in Spring Boot projects, covering zero-config setup, programmatic and declarative API grouping, handling WebMvcConfigurer and Spring Security conflicts, with code examples for OpenAPI 3 compliance.
API DocumentationOpenAPI 3Spring Boot
0 likes · 16 min read

This article explains how @EnableWebMvc imports WebMvcConfigurationSupport, triggering @ConditionalOnMissingBean to skip WebMvcAutoConfiguration entirely, causing loss of static resource mapping, custom message converters, content negotiation, and spring.mvc.* properties, while showing the correct pattern of implementing WebMvcConfigurer without the annotation.
@EnableWebMvcAuto-ConfigurationConditionalOnMissingBean
0 likes · 14 min read

This tutorial explains why SpringDoc replaces the deprecated SpringFox for Spring Boot 2.6+/3.x, demonstrates zero-config setup with springdoc-openapi-starter-webmvc-ui 2.5.0, covers programmatic and declarative API grouping via GroupedOpenApi beans or YAML, and shows how to resolve static resource conflicts with WebMvcConfigurer and SpringSecurity permitAll rules for /swagger-ui/**, /v3/api-docs/**, and /webjars/**.
API DocumentationGroupedOpenApiOpenAPI 3
0 likes · 15 min read

This tutorial demonstrates how to create a custom @ConvertJson annotation in Spring Boot 3.5.0 that automatically fetches JSON from a URL parameter and converts it into a typed Java object, using HandlerMethodArgumentResolver and BeanPostProcessor for both method-parameter and field-level injection with SpEL support.
BeanPostProcessorCustom AnnotationHandlerMethodArgumentResolver
0 likes · 12 min read

This article explains how to implement a SpringBoot HandlerInterceptor to perform login authentication, configure it with a whitelist, return a unified 401 JSON response, and extend it with Redis token validation, advanced usage, and a comparison with servlet filters.
HandlerInterceptorInterceptorLogin Authentication
0 likes · 9 min read

This guide explains how the WebMvcConfigurer callback interface lets developers extend Spring MVC behavior without disabling Spring Boot’s auto‑configuration, covering the full request lifecycle, common customizations such as interceptors, CORS, message converters, static resources, async support, and production‑grade pitfalls.
AsyncSupportCORSInterceptor
0 likes · 10 min read

This guide explains how to use @PathVariable to capture URL segments, configure static resource mapping for local files, and centralize path values in Spring Boot applications, providing code examples for request mapping, resource handler registration, and property injection.
JavaPathVariableSpring Boot
0 likes · 3 min read

This article explains the purpose and usage of Spring MVC’s HandlerMethodArgumentResolver and HandlerMethodReturnValueHandler extension points, demonstrates how to implement custom argument resolvers and return‑value handlers, discusses common pitfalls such as handler ordering, and shows how to replace the default processors to achieve unified request and response processing.
HandlerMethodArgumentResolverHandlerMethodReturnValueHandlerJava
0 likes · 16 min read

This guide explains how Spring Boot 2.4.12 automatically configures Spring MVC components such as view resolvers, converters, and message handlers, and shows how to customize them via WebMvcConfigurer, WebMvcRegistrations, HttpMessageConverters, and @JsonComponent, including code examples for full control over the Web MVC setup.
HttpMessageConvertersJSON SerializationSpring Boot
0 likes · 8 min read

This article explains how to secure a SpringBoot web application by creating a login interceptor with the HandlerInterceptor interface, registering it via WebMvcConfigurer, managing user sessions, and demonstrates the complete code and verification steps to ensure authenticated access.
HandlerInterceptorJavaLogin Interceptor
0 likes · 9 min read

This article explains why browsers enforce the same‑origin policy, defines cross‑origin requests, outlines the restrictions of non‑same‑origin interactions, and presents five practical methods—including a global CorsFilter, WebMvcConfigurer, @CrossOrigin annotation, manual header setting, and a custom filter—to implement CORS in Java Spring backends.
BackendCORSCross-Origin
0 likes · 8 min read

This article explains the Same Origin Policy, introduces CORS as its solution, details the required response headers, and provides three practical ways—global configuration, servlet filter, and @CrossOrigin annotation—to enable cross‑origin requests in Spring Boot applications.
CORSCross-Origin Resource SharingServlet Filter
0 likes · 10 min read

This article explains how to extend Spring MVC in Spring Boot by implementing WebMvcConfigurer, how the default auto‑configuration works, and why using @EnableWebMvc fully takes over MVC configuration, while also providing code examples and resource links for deeper learning.
@EnableWebMvcBackend DevelopmentMVC
0 likes · 8 min read
