Top "Spring-mvc" questions

A framework for building Java web applications based on the Model-View-Controller (MVC) pattern.

How to fix Hibernate LazyInitializationException: failed to lazily initialize a collection of roles, could not initialize proxy - no Session

In the custom AuthenticationProvider from my spring project, I am trying read the list of authorities of the logged user, …

java spring hibernate spring-mvc spring-security
Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported for @RequestBody MultiValueMap

Based on the answer for problem with x-www-form-urlencoded with Spring @Controller I have written the below @Controller method @RequestMapping(value = "/{…

spring spring-mvc model-view-controller
Spring mvc @PathVariable

Can you give me a brief explanation and a sample in using @PathVariable in spring mvc? Please include on how …

spring-mvc
How to convert a multipart file to File?

Can any one tell me what is a the best way to convert a multipart file (org.springframework.web.multipart.…

java spring spring-mvc file-upload cloudinary
@Scope("prototype") bean scope not creating new bean

I want to use a annotated prototype bean in my controller. But spring is creating a singleton bean instead. Here …

spring spring-mvc
Binding a list in @RequestParam

I'm sending some parameters from a form in this way: myparam[0] : 'myValue1' myparam[1] : 'myValue2' myparam[2] : 'myValue3' otherParam : …

java spring data-binding collections spring-mvc
How to handle static content in Spring MVC?

I am developing a webapp using Spring MVC 3 and have the DispatcherServlet catching all requests to '/' like so (…

spring-mvc
Passing multiple variables in @RequestBody to a Spring MVC controller using Ajax

Is it necessary to wrap in a backing object? I want to do this: @RequestMapping(value = "/Test", method = RequestMethod.POST) @…

java spring http spring-mvc
Spring MVC: Complex object as GET @RequestParam

Suppose i have a page that lists the objects on a table and i need to put a form to …

java spring-mvc
Trying to use Spring Boot REST to Read JSON String from POST

Am using the latest version of Spring Boot to read in a sample JSON via Restful Web Service... Here's my …

java json rest spring-mvc spring-boot