spring-mvc Questions

26

Solved

I have a spring boot application that works fine when I run it using the embedded server from Intellj. However, when I package it into .war file and deploy it on tomcat I get the following error: ...
Snip asked 21/1, 2019 at 12:43

15

Solved

After developing Spring roo project, I found following errors in class: The import javax.validation.constraints.NotNull cannot be resolved NotNull cannot be resolved to a type I am using STS 3.1....
Billyebilobate asked 30/11, 2012 at 16:21

2

Solved

I am using Tomcat log to log the access info. And the definitions of %D and %F in official doc are: %D - Time taken to process the request, in millis %F - Time taken to commit the response, in mi...
Eufemiaeugen asked 9/3, 2017 at 2:39

7

Solved

I have a Spring MVC project using IntelliJ IDEA 14 as my IDE (I'm new to IntelliJ IDEA; I used Eclipse). My main Java code is in folder src/main, and the unit test code is in src/test. While deplo...
Saratov asked 14/8, 2015 at 9:8

12

Solved

I know this question has been asked over and over here and there are several solutions. I've tried several of those except the ones that suggests writing you own configuration bean for this. I don'...
Bougie asked 19/9, 2017 at 13:41

11

Solved

I have a Spring Boot application that uses Spring Security and Thymeleaf template. I am trying to display the logged-in user's first name and last name in a template when the controller is managed ...
Figurative asked 29/1, 2016 at 17:19

6

Solved

I've generated a Spring Boot web application using Spring Initializr, using embedded Tomcat + Thymeleaf template engine. I put this property in my application.properties [email protected] ...
Cataldo asked 22/4, 2017 at 18:15

6

Solved

The following property exists: security.enable-csrf=false BUT csrf protection is still on if I add the property to application.properties. What works is to disable it programatically. But I'd p...
Laing asked 29/6, 2017 at 11:51

3

Solved

I'm not sure if I'm missing something really basic but this is what I would like to do. I would like to make a rest API call to this address: https://localhost:8080/fetchlocation?lat=-26.2041028&...
Alfons asked 20/9, 2015 at 12:32

35

I am using spring data rest for my application. I am getting following error and application doesn't get started when I add this method in repository:- Method:- @Modifying @Transactional @Query(...
Passifloraceous asked 25/10, 2016 at 13:50

4

Solved

In spring I have a controller with an endpoint like so: @RequestMapping(method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) @ResponseBody public OutputStuff createStuff(@RequestBody ...
Hort asked 24/9, 2015 at 14:25

3

Solved

I'm trying to test (through Spring test (mvc)) a controller that uses servletRequest.getParts() All I've read so far is that MockMvcRequestBuilders.fileUpload().file() is the solution. However I ...
Flyblow asked 3/5, 2016 at 9:30

5

Solved

I am using methods like this @RequestMapping(method = RequestMethod.GET) public ResponseEntity<UserWithPhoto> getUser(@RequestHeader(value="Access-key") String accessKey, @RequestHeader(va...
Karaganda asked 7/9, 2015 at 15:23

11

Solved

I am trying to develop Spring Boot web application and securing it using Spring security java configuration. After placing my static web resources in 'src/main/resources/public' as advised here in...
Bloodline asked 23/7, 2014 at 17:17

2

I am getting following error in building the maven project. Any idea in solving this? [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create (default) on project pwc...
Tibbs asked 23/2, 2016 at 8:16

8

Solved

I am trying to run a Spring MVC application in my local machine through Tomcat, but I am seeing: NoClassDefFoundError: javax/validation/ValidatorFactory I have validation-api-1.0.0.GA.jar in web...
Peddler asked 29/10, 2014 at 18:15

3

I have very basic simple Spring Boot Rest application. I needed to implement custom authentication in Spring Security: for every REST request I need to check username and password, that are in spe...
Vain asked 6/11, 2015 at 13:44

7

Solved

I need to retrieve resources from my server by sending a GET request with some Authorization headers using RestTemplate. After going over the docs I noticed that none of the GET methods accepts hea...
Amorete asked 13/1, 2014 at 21:0

4

Solved

In version 2.1.0, spring.servlet.multipart.max-file-size property failed to bind org.springframework.util.unit.DataSize. Property : spring.servlet.multipart.maxFileSize= 50Mb Exception Descript...
Shlomo asked 7/11, 2018 at 11:18

5

Solved

I have the following controller: @Controller public class ConfigController { @GetMapping("/") public String index() { return "config"; } } However, I receive the following...
Intermezzo asked 27/5, 2022 at 13:57

9

I am getting no-error when trying to Build, compile and Verify But when i am trying run using Maven to run this project start getting "Closing JPA EntityManagerFactory for persistence unit 'de...
Jarl asked 18/10, 2021 at 16:20

2

Solved

I know this question is asked many times, I have tried all the possible solutions still the problem persists. Actually the very same project runs with 0 errors in Tomcat 8 which was deployed direc...
Visor asked 4/2, 2015 at 7:53

14

Solved

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 in...
Mutilate asked 19/8, 2016 at 10:30

8

Solved

I have some problems wth autowire annotation. My app looks like this: Here is controller: @Controller public class MyController { @Autowired @Qualifier("someService") private SomeService someS...
Rosco asked 26/11, 2010 at 18:48

3

Below exception handler that is common for all my controllers, is working fine except that I need to disable the WARN log from AbstractHandlerExceptionResolver class after processing the exception....
Keenan asked 23/2, 2019 at 1:35

© 2022 - 2024 — McMap. All rights reserved.