58,884 questions
0
votes
1
answer
49
views
Replacing default RememberMeAuthenticationProvider added by spring-security
I need to provide my own custom RememberMeAuthenticationProvider provider, which I know how to do. But the default created one is still present in the ProviderManager list of providers.
Can I ...
0
votes
0
answers
84
views
"Name cannot be blank" error when creating entity despite providing name in request body in Spring Boot
I'm working on a Spring Boot application where I need to create a Data Center using a REST API. However, I keep encountering an error stating "Name cannot be blank" even though I am ...
0
votes
0
answers
89
views
How to migrate a simple WebObjects 5 application to a Java-based Spring Boot/MVC web application?
I am working on migrating a legacy WebObjects 5 web application (documented here: https://developer.apple.com/library/archive/documentation/LegacyTechnologies/WebObjects/WebObjects_5/...
0
votes
1
answer
47
views
The www-authenticate header breaks JettyClientHttpConnector
Environment
Spring Boot 3.3.4
Spring Web 6.1.1
Old surroundings where it operated
Spring Boot 2.7.18
Spring Web 5.3.31
Context
We have migrated from a Spring Boot 2.7.18 environment to Spring Boot ...
1
vote
1
answer
64
views
Is Using a Single Generic Repository for All Entities a Good Practice in Spring Data JPA for Large Project
I’m working on a large Spring Boot application and I’m looking for advice on how to handle repositories for multiple entities. I want to avoid creating individual repositories for each entity and ...
0
votes
1
answer
120
views
SSE Async API in Spring MVC throws Error IllegalStateException: Cannot call sendError() after the response has been committed
I have Spring MVC Service with SSE API having controller return type ResponseEntity<SseEmitter>.
and in background Async thread, we send continuous data messages to the client over SseEmitter
@...
0
votes
1
answer
235
views
Unable to create RestTemplate while upgrading Spring Boot 3.x from http/1.1 to http/2
Unable to Communicate between Spring boot apps in http/2 using RestTemplate.
I have been in the process of Upgrading my Spring boot Micro Services from http/1.1 to http/2.0.
I was able to spin up the ...
0
votes
0
answers
164
views
Java Maven+Spring Project: JSP Webpage 404 Error
I've been having issues getting my JSP webpage to display on my browser when I execute my Spring Boot project.
I'm using Spring MVC to map my JSP with an application properties file and a main ...
0
votes
1
answer
1k
views
How to publish slo/percentile distribution metrics for my micrometer timer?
The question originally came from the problem with metrics configuration for Spring Cloud Gateway, as there are no documentation neither on Micrometer nor Spring Cloud nor Spring side. When i enable ...
0
votes
1
answer
24
views
Spring @LoadBalanced RestTemplate doesn't resolve inside interceptor
I have a custom RestTemplate that registers an interceptor:
@Bean
@LoadBalanced
public RestTemplate restTemplate() {
var timeout = 15000;
var clientHttpRequestFactory = new ...
0
votes
1
answer
38
views
What value will be set for the following request parameter?
I am learning Spring mvc framework. This is some code snippet from the view part.
<a href="/main?logout">Log out</a>
In my understanding, when I click this link, I will send a ...
0
votes
0
answers
178
views
How to find the size of JSON response to populate the header "Content-Length"
I have a spring project where I need to compress the JSON response if the size of the response is greater that 2KB.
Spring has the property server.compression.min-response-size=2048 but is only does ...
0
votes
1
answer
55
views
Making database work with a Dockerized Java Spring application
I would like to run my containerized Java Spring application which runs completely fine on my machine (of course, lol).
I have a problem with the JPA database connection.
What stumps me is that this ...
1
vote
0
answers
22
views
Spring mvc functional endpoints and form validation
With the recents version of spring mvc, there is now an alternative to the classical spring mvc, the one with @Controller annotations.
The documentation of the functional enpoints is here: https://...
0
votes
1
answer
443
views
Update to spring-boot-starter-parent to 3.2.12 broke spring code
Here is the exception I am getting after upgrading spring-boot-starter-parent from 3.1.12 to 3.2.12
java.lang.IllegalStateException: Failed to load ApplicationContext for [MergedContextConfiguration@...
0
votes
0
answers
39
views
Spring: check if annotation is used but bean is not present
I have some homemade annotation (let us call it @A) that can be used on RequestMappings to work with some OncePerRequestFilter (called MyFilter here).
I have made an autoconfiguration to conditionally ...
0
votes
0
answers
33
views
How to Schedule User-Specific Follow-Up Tasks in Spring Boot with Variable Delays?
How can I implement a system in Spring Boot to schedule follow-up tasks after a user is onboarded? For example:
If User A is onboarded to the system at 12 PM today, an IVR call should be scheduled for ...
0
votes
1
answer
34
views
java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'description' available as request attribute
I am getting the error:
java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'description' available as request attribute.
Could you help me correct this error?...
0
votes
0
answers
52
views
Validate saml2 login response inside controller using spring security
I am trying to implement spring security in our exsisting project. Currently we are using Openam for saml authentication. The current architecture is we are triggering the saml authentication requests ...
0
votes
0
answers
300
views
Spring MVC responds with 200 even with AsyncRequestNotUsableException
I have a gateway A that calls my service B (spring boot app 3.3.3)
The http client of the gateway has a timeout of 10s when calling microservice B
Sometimes when service B exceed 10s, i have this ...
1
vote
0
answers
84
views
Spring Boot with EclipseLink: TransactionRequiredException - No Active Transaction for JPA Repository Methods
I have a springboot app. wit this conf file:
@EnableTransactionManagement
@EnableJpaRepositories({ "org.moib.kwbom.repositories", "org.moib.kwbom.notification.repositories"})
@...
0
votes
1
answer
151
views
VeraCode static scan CWE-73: External Control of File Name or Path
My application Spring Boot 3 Mvc has the following controller method:
@RequestMapping(value = "/addToCart", method = RequestMethod.POST)
public String addToCart(WebRequest webRequest, ...
0
votes
1
answer
156
views
Skip Custom JWT Filter for /api/auth/signin while Using permitAll() [duplicate]
I'm using Spring Security 6 with a custom JwtAuthenticationFilter to handle JWT-based authentication for my API. However, despite using .permitAll() for the /api/auth/signin endpoint, the custom ...
0
votes
1
answer
98
views
Spring+Thymeleaf - Map as form-backing bean
Supposing I have the following controller code:
@ModelAttribute("test")
public Map<String, String> test() {
Map<String, String> someMap = new HashMap<>();
...
-1
votes
2
answers
51
views
MockMVC test controller from other module
Given this maven modules:
web = MVC Layer (Spring MVC Project with Controllers)
client = WebClient (Spring Webflux WebClient)
How can i integration test the client module to fetch information from a ...