Browse all latest questions tagged Spring Mvc
I have made a program to consume a third part API: I have a service Called:NewsService @Service public class NewsService { @Autowired private NewsRepository newsRepository; public List<...
I'm fairly new to Spring, and I've looked at many posts about similar scenarios, but I have yet to figure this out. I'm trying to alter an existing (working) endpoint in my project to pass an array...
When I hit the database with PagingAndSortingRepository.findAll(Pageable) I get Page<ObjectEntity>. However, I want to expose DTO's to the client and not entities. I can create DTO just by injec...
I did a simple web socket communication with spring 4,STOMP and sock.js, following this https://github.com/rstoyanchev/spring-websocket-portfolio and this http://assets.spring.io/wp/WebSocketBlogPost....
I am using JTables with Spring / Ajax , the data is being returned from Spring and is visible in Firebug. However when the JTable is getting painted , I am getting this error Requested unknown param...
I'm newbie in Spring Data. I keep getting the error: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported I've tried to change consumes ins...
Spring version 4.2.0, Hibernate 4.1.4 Here is my Controller function: @RequestMapping(value = "/mobile/getcomp", method = RequestMethod.GET) @ResponseBody public List<Company> listforCompanies...
I read in some posts about Spring MVC and Portlets that field injection is not recommended. As I understand it, field injection is when you inject a Bean with @Autowired like this: @Component public...
I have the following JAVA controller: @RequestMapping(value = "/data/upload", method = RequestMethod.POST) public @ResponseBody void uploadData(@RequestParam("file"...
I am getting below error while creating spring maven rest webservice. It works fine when i use postman to test post request on the api for ocbc. But when i tried to do post request for citi, i got the...
I have found few questions on this topic however it does not necessary answer my question Basicaly I am passing some values via url so data can be gathered from database. I can do it via method= Requ...
I have the following controller which accept input as @RequestParam @RequestMapping(value = "/fetchstatus", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public Response fe...
I'm having problems with spring boot. I got the error Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-09-22 10:16:18.954 ERROR 13...
I am trying to validate some information, so I added a validator and used @Valid in the parameter of the post method: @Controller @RequestMapping("/user.htm") public class UserController { @Auto...
A little greedy question here, hope this one could also help others who want to know more about annotation validation I am currently studying Spring, and for now, I am planning to try out the customi...