spring-mvc Questions

5

Solved

I'm following the Learn Spring 5 etc on udemy and I'm at the part where we test our application. Everything worked fine till now, i was able to connect to the postgreSQL database and all but now I'...
Rudbeckia asked 14/3, 2020 at 22:20

3

Solved

I'm working in a REST service made with spring-boot, which to this day is documented using springfox-swagger2:2.7.0 (implementation first). The last operation I've added looks like this: @ApiOpera...
Larrylars asked 3/9, 2018 at 10:35

13

I am migrating my project which is based on springMVC to spring boot. it is a multi-module project. I am unable to get the swagger-ui.html up. I have added dispatcher servlet as follows: @Configura...
Preconception asked 23/11, 2018 at 21:14

4

I am using java 11, and I have added flyway in spring-boot application like below. dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation group: 'mysql', ...
Spirelet asked 22/6, 2022 at 8:5

13

Solved

I have the following controller: @RestController public class RestaurantController { @Autowired RestaurantService restaurantService; @RequestMapping(value = "/restaurant/", method = RequestMeth...
New asked 13/2, 2016 at 15:1

5

Solved

I have a Spring Boot for serving images. My Model is included in my ImageController.java. ImageService contains findPage method. When running my Spring Boot Application I am getting this error. 2...
Masjid asked 21/6, 2018 at 9:58

6

Solved

Consider the following mapping: @RequestMapping(value = "/superDuperPage", method = RequestMethod.GET) public String superDuperPage(@RequestParam(value = "someParameter", required = true) String p...
Meeker asked 10/6, 2016 at 10:53

8

Solved

I have spring REST set up fine using Jackson/JSON and everything works. But I knowingly introduced an error in the structure of the message which resulted in a 400 - Bad Request. But there was no ...
Unarmed asked 26/6, 2013 at 17:44

5

Solved

Is it possible to Define a Spring RestController (@RestController annotated class) solely in the Java Configuration (the class with @Configuration annotated in the method marked with @Bean)? I hav...
Vegetarianism asked 13/6, 2020 at 4:42

26

Solved

I am trying to use spring-boot-starter-web to create a rest service serving up JSON representations of Java objects. From what I understand this boot-starter-web jar is supposed to handle the conve...
Chime asked 11/2, 2015 at 22:58

8

Solved

I am new in Spring Application with Gradle. Running my project to create the database objects based on my classes created, i got the following error: Exception in thread "main" org.springframework...
Eadith asked 4/11, 2015 at 10:34

7

Solved

After a new user submits a 'New account' form, I want to manually log that user in so they don't have to login on the subsequent page. The normal form login page going through the spring security ...
Gelatin asked 12/1, 2011 at 2:44

6

This a springboot Application. It run perfectly but did not get output (it shows me HTTP Status 404 error in browser) pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http...
Pomposity asked 2/12, 2017 at 6:47

9

We use Spring Boot/MVC with annotation-based java-config for series of RESTful services and we want to selectively enable HTTP GZIP stream compression on some API responses. I know I can do this ma...
Perigee asked 28/1, 2014 at 15:49

5

Solved

I need to add the header in each response. I am planning to do below public class MyFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest request, ...
Chronometry asked 28/9, 2015 at 18:2

4

Solved

I´m using for my app spring-mvc and I have managed go up file to server, with label: <form:input path="file" type="file" id="file"/>, but I have a problem when my app changes of language, bec...
Bruns asked 11/12, 2013 at 10:59

9

I want to write a test case to check my controller (getPersons). This is a server side code. I have confusion what should i put inside @ContextConfiguration(locations={"file:src/main/webapp/WEB-INF...
Opulence asked 20/6, 2013 at 17:50

26

Solved

I get this error when trying to invoke "persist" method to save entity model to database in my Spring MVC web application. Can't really find any post or page in internet that can relate t...
Mucor asked 28/8, 2015 at 10:44

6

Solved

There is a Spring-MVC application. In controllers, when returning the results of methods, I return via ResponseEntity<>. On success, I return (200 statutes) the OK-method. But when creating s...
Mycosis asked 11/6, 2020 at 11:50

10

Solved

I'm making a Spring MVC web app. The problem is that on single method is called twice and I don't know why. @RequestMapping(value="/profile/{id}", method = RequestMethod.GET) public String display...
Gand asked 31/3, 2016 at 6:14

4

Solved

I have a spring mvc (3.2.5) application with spring security (3.2). I configured my SecurityConfig.class with this method : @Override protected void configure(HttpSecurity http) throws Exceptio...
Derringdo asked 13/2, 2014 at 9:19

7

I have a simple text input field where i have to set default value from one object and save its final value in other. The following code is not working. <div th:object="${form}"> <input ...
Guacharo asked 30/7, 2014 at 2:22

30

Can @Component, @Repository, and @Service annotations be used interchangeably in Spring or do they provide any particular functionality besides acting as a notation device? In other words, if I hav...
Uncanny asked 26/7, 2011 at 9:10

3

Solved

I have the requirement of returning JSON/XML data from my controller.From what i found,I needed @ResponseBody in my method and for that I need <mvc:annotation-driven> enabled. I have tried al...
Mccready asked 14/3, 2013 at 10:6

3

Solved

my web.xml config is <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>...
Ensile asked 17/11, 2011 at 5:48

© 2022 - 2024 — McMap. All rights reserved.