spring-mvc Questions

15

Solved

What is the best way to get the root/base url of a web application in Spring MVC? Base Url = http://www.example.com or http://www.example.com/VirtualDirectory
Tenstrike asked 16/2, 2011 at 4:25

8

Solved

So, I have a simple properties file with the following entries: my.value=123 another.value=hello world This properties file is being loaded using a PropertyPlaceHolderConfigurer, which reference...
Thibaut asked 9/11, 2010 at 4:22

3

We have a HTTP request which when handled in server will create a response approximately 3GB in size, this data is an aggregation of 6 queries to database, how can we send this data as individual r...
Idola asked 18/12, 2017 at 12:18

5

We are migrating from spring 4.x to spring 5.2.13 version. In spring 4 this was working but in spring 5.x we are getting the below error for dispatcher servlet javax.servlet.ServletException: No a...
Lumbard asked 5/5, 2021 at 12:12

13

I am using Spring security version 3.1.4.RELEASE. How can I access the current logged in user object? SecurityContextHolder.getContext().getAuthentication().getPrincipal() returns user name, not u...
Statuette asked 17/8, 2015 at 13:46

5

Solved

I'm using spring boot 1.5.2 and my spring rest controller looks like this @RestController @RequestMapping("/") public class HomeController { @RequestMapping(method=RequestMethod.GET) public Str...
Selfexecuting asked 6/4, 2017 at 18:59

2

I want to customize DefaultHandlerExceptionResolver in my Spring Boot application but custom implementation was never reached when exception was occurred. build.gradle buildscript { ext { sprin...
Cartercarteret asked 29/12, 2018 at 23:3

9

I have annotated mappings working great through my spring mvc web app, however, they are case sensitive. I cannot find a way to make them case insensitive. (I'd love to make this happen within Spri...
Mayst asked 10/11, 2010 at 23:15

2

Solved

I'm having a controller which receives JSON Object as input. But the problem is that, the content of JSON will vary for different requests, so Im not able to map the RequestBody to a POJO. Is there...
Clementina asked 3/7, 2018 at 9:59

3

Solved

I have a problem with my spring application since I've tried to include some security things. After building a small working app including angularJS I followed this spring security tutorial but I ...
Innominate asked 25/3, 2015 at 9:35

12

Solved

Based on the answer for problem with x-www-form-urlencoded with Spring @Controller I have written the below @Controller method @RequestMapping(value = "/{email}/authenticate", method = RequestMe...
Loophole asked 19/11, 2015 at 5:51

5

Solved

I know that in spring I must define welcome-file, which should be outside of WEB-INF folder, so I define it like this: web.xml: <welcome-file-list> <welcome-file>index.jsp</welcom...
Hyrcania asked 14/9, 2011 at 10:48

7

Solved

I have successfully sent simple email using this: SimpleMailMessage mailMessage = new SimpleMailMessage(); mailMessage.setTo("[email protected]"); mailMessage.setSubject("This ...
Forerunner asked 13/3, 2011 at 14:3

4

Solved

How do I make body optional in REST API calls when using @RequestBody annotation in Spring? With Spring's latest version, if you use @RequestBody annotation, it makes client to send body all the t...
Jataka asked 24/2, 2015 at 3:23

6

I tried to use EhCache 3.5 caching features in our web application based on Spring Boot 2/Spring Framework 5. I added EHCache dependency: <dependency> <groupId>org.ehcache</group...
Rodl asked 1/3, 2018 at 10:21

3

Solved

I am using JUnit to test my Spring MVC controller. Below is my method which returns a index.jsp page and shows Hello World on the screen - @RequestMapping(value = "index", method = RequestMethod....
Coaly asked 4/3, 2014 at 21:14

2

Solved

I have below code in my controller: @RequestMapping(value = "/child/{nodeId}/{relType}",method = RequestMethod.GET, produces=MediaType.APPLICATION_JSON) public Iterable<Node> getCo...

3

I am using Spring Boot framework. I want to send an object from a service to another service via RabbitMQ like this: Service A: rabbitTemplate.convertAndSend("queue", createAccountRequest...
Astonied asked 20/11, 2017 at 14:39

5

Solved

I am current developing an application based on Spring-Boot. I know that annotation like @Scheduled can schedule tasks. Since users in my application wanna send mails at different time and send o...
Sensualist asked 28/1, 2016 at 14:46

2

Solved

I am working on Spring MVC, On project startup i have set database to import default sql with hibernate configuration hibernate.hbm2ddl.import_files. Data inside import.sql is encoded with UTF-8. ...
Corporator asked 5/10, 2015 at 16:10

4

Solved

I am using lazy loading with hibernate in my web app. I would like to load some objects from the database at the parsing stage of the server response @Component public class DesignSerializer ext...
Talton asked 10/7, 2013 at 16:31

1

can someone help me please: I trying to migrate huge java project from hibernate 5, spring 5 & spring boot 2 to hibernate 6, spring 6 & spring boot 3 but I'm stuck with an OutOfMemory excep...
Flaviaflavian asked 12/4, 2023 at 12:29

5

here is my index.js file import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom' import App from './components/App'; ReactDOM.render(( <...
Bonacci asked 7/12, 2017 at 7:42

2

Solved

I am getting an exception while posting a call to Spring controller Exception is: org.springframework.web.bind.MissingServletRequestParameterException : Required Long parameter 'userId' is not p...
Donata asked 26/8, 2015 at 8:4

10

As described in CORS preflight request fails due to a standard header if you send requests to OPTIONS endpoints with the Origin and Access-Control-Request-Method headers set then they get intercept...
Wraparound asked 22/6, 2017 at 11:19

© 2022 - 2024 — McMap. All rights reserved.