Questions tagged [spring5]
94 questions
0
votes
0 answers
Spring: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler
we are trying to upgrade spring from 4.x to 5.3.x
this is the dispatcher-servlet.xml file:

Bharath
- 81
- 1
- 11
0
votes
0 answers
BeanFactoryLocator alternative in Spring 5
We were using 4.2.x version of spring and we are using BeanFactoryLocator to create a factory from xml file.
method to return Beanfactory:
private BeanFactory createServicesContainer() {
BeanFactoryLocator bfLocator =…

Bharath
- 81
- 1
- 11
0
votes
0 answers
Not able to Refer to different xml using Spring 5.2.x
With Spring 4.3.5, we have been using an application architecture where we initialize some of the beans at a go and then use the beans as "Reference" for other beans.
Something like this

Subhranil Sengupta
- 89
- 1
- 12
0
votes
1 answer
Spring Kotlin Bean DSL - register bean only if other bean is present?
I want to register bean (MyBean) only if another bean (anotherBeanThatShouldBePresent) is present in the context.
How I can achieve that?
bean {
MyBean(
anotherBeanThatShouldBePresent = ref()
)
}

pixel
- 24,905
- 36
- 149
- 251
0
votes
1 answer
After migrating from Spring 4.2.7 to 5.3.2, none of applicationcontext(web/service) files are loaded and RESTful services are failed to execute
Post migrating from Spring 4.2.7 to 5.3.2 none of REST API's of our application are triggering. For ex: every REST call I make I get the error in stp.log is:
No mapping for GET /application relative path/XXXX/YYYY.rest
Here are important…

Naveen
- 1
- 2
0
votes
1 answer
Unable to locate Attribute with the the given name [ANumber] on this ManagedType [com.company.domain.Statistics]
I just upgraded my project to spring5 which is causing the below error for the code which was working fine with earlier spring version.
The problem is JPA should map aNumber to ANumber but its not doing so its taking ANumber as ANumber rather than…

Shivang Agarwal
- 1,825
- 1
- 14
- 19
0
votes
0 answers
Two way SSL certificates for API Calls
I have a public certificate, SSL client private certificate available in my local. I am not sure how to use these certificates and make API calls (Using Two-way SSL) in my Spring-MVC code (using Keystore/truststore).
Could someone help with a java…

Itok
- 23
- 1
- 6
0
votes
2 answers
Why am I getting code 400 response instead of error json object in tomcat 9 with spring 5?
The controller:
@RestController
@RequestMapping(value = "/test", produces = MediaType.APPLICATION_JSON_VALUE)
@Validated
public class ApiController {
@PostMapping(value = "/in",
consumes = MediaType.APPLICATION_JSON_VALUE)
…

osmingo
- 994
- 1
- 8
- 16
0
votes
0 answers
POST request with multipart data in spring webflux
i am working with spring webflux when i added security to my app,the multipart or payload data on POST request coudnt be found in the controller, you can find below my security configuration class and my custom webfilter class
import…

BILEL KANNOU
- 1
- 2
0
votes
1 answer
@ActiveProfiles in Spring Test does not support placeholders any longer
I am upgrading from Spring 4.3 to Spring 5.3 and it seems that placeholders are no longer supported for the @ActiveProviles annotation.
The following code worked with the old Spring…

Christian
- 31
- 3
0
votes
0 answers
Spring 5: MVC controller argument pageable doesn't get initialised
I have a controller like so:
@GetMapping(value = "/list")
@PreAuthorize("@authService.hasPermission('read')")
public Page getlist(
@PageableDefault(page = 0, size = 10, sort = "id")
Pageable pageable,
…

Vivek Shankar
- 770
- 1
- 15
- 37
0
votes
1 answer
TestRestTemplate and spring security
I am learning spring rest. I am slowly building an application. I had full integration testing working well using TestRestTemplate.
However, I just started adding spring security to my application. Literally as soon as I add the spring security…

springcorn
- 611
- 2
- 15
- 28
0
votes
1 answer
spring boot can't resolve thymeleaf templates
I am new to spring 5 and spring boot.
I am trying to create a spring 5/spring boot application with thymeleaf.
I want to creates a war rather than use the embedded webserver with spring boot.
When I deploy my war, my application starts and I can…

springcorn
- 611
- 2
- 15
- 28
0
votes
1 answer
webClient response using bodyToFlux method merging all the received response instead separating it out
I am using ParallelFlux for running many task.
but when i am receiving webClient response using bodyToFlux method its merging all the output response instead of getting one by one.
i want the output should be one by one not single string, is…

Shekhar Rathore
- 55
- 2
- 6
0
votes
1 answer
Using jpa2.2 on Websphere with spring/hibernate
I recently inherited a Spring/Hibernate app, and upgraded it to Spring 5.2.8, SpringSecurity 5.3.4, Hibernate 5.4.21.
We are deploying on Websphere 8.5.5 (full, not liberty).
When I try to run the application, I get an exception, of which I believe…

simonalexander2005
- 4,338
- 4
- 48
- 92