spring-mvc Questions

2

I'm trying to write integration test for Spring Boot application. I have Product and GalleryImage domain model. They are in one-to-many relationship. public class Product { ... @OneToMany(mappe...
Gmt asked 17/3, 2016 at 14:27

3

Solved

I can't find correct client request flow in below syntax.Could someone please clarify what is happening here? Client(1) --> Dispatcher Servlet(2) --> Handler Mapping(3) --> Controller(4) ...
Syllepsis asked 13/1, 2015 at 9:22

3

Solved

After upgrading my rest service from Spring Boot 1.5.10 to 2.0.0 I encountered my tests failing which passed before. Following Scenario: import org.mockito.internal.matchers.Null; import static o...
Perkin asked 14/3, 2018 at 14:4

16

I'm trying to document and existing Rest API a Spring MVC project (NOT spring boot!). My application is called api so http://localhost:9090/api would be the root endpoint. Because I'm using sprin...
Garbo asked 21/4, 2017 at 14:41

4

Solved

I have a Java Spring MVC web application. From client, through AngularJS, I am uploading a file and posting it to Controller as webservice. In my Controller, I am gettinfg it as MultipartFile and ...
Leer asked 13/1, 2014 at 10:34

7

Solved

I have a Spring Controller with several RequestMappings for different URIs. My servlet is "ui". The servlet's base URI only works with a trailing slash. I would like my users to not have to enter t...
Jackinthepulpit asked 20/8, 2012 at 19:10

2

Solved

I am starting to build a Microservice API Gateway, and I am considering Spring Cloud to help me with the routing. But some calls to the Gateway API will need multiple requests to different services...
Sayyid asked 8/4, 2019 at 13:16

7

Solved

I'm using Spring 4 MVC with Jackson 2 for my service. For one of the operations I have a request object that has an attribute where the leading camel case word this is only one letter in length: p...
Irrelevancy asked 13/5, 2015 at 3:10

4

I am trying to test a method of my controller in a Spring Boot application. This is a post endpoint, which gets an id in a request and it passes on this id to a service: @Slf4j @Controller public ...
Pullover asked 21/4, 2018 at 13:22

3

I've implemented a java method which call to external services via a Resttemplate. As well, i've implemented some additional business logic also inside that method. How can i implement a retry mech...
Prebendary asked 22/10, 2019 at 17:37

5

Solved

I am implementing Spring WebSocket into our Spring MVC web application. However I am running into message over size limits when I am trying to send a really big message to an endpoint. I am getti...
Aleuromancy asked 17/12, 2015 at 19:59

3

Solved

I'm using Thymeleaf with spring mvc 4 but I have a problem when I want to print a list size <tr th:each="u : ${users}" th:id="${u.username}" class="odd gradeX"> ...
Monaghan asked 19/4, 2017 at 0:6

4

Solved

Hi i am new at springboot, i trying to create RESTful API with it, it's already work when i create controller with it, but when i trying to add this line at pom.xml <dependency> <groupId...
Parlin asked 27/1, 2020 at 8:11

4

Solved

I keep getting the following error after I put the required files in my build path on Eclipse. I am working on a Spring MVC Hello World Application and using Eclipse Helios for Java EE developers: ...
Bewhiskered asked 16/1, 2012 at 18:48

4

Solved

Intellij Not Recognizing Model Variables in HTML. How to resolve model variables. I don't get any idea for this issue. Here is my Controller @Controller public void someController { @RequestMap...
Unspoken asked 30/5, 2018 at 0:5

4

Solved

The opposite of: How to manually log out a user with spring security? In my app I have register new user screen, which posts to a controller which creates a new user within db (and does a few obvi...
Infest asked 26/10, 2011 at 9:40

4

Solved

I use Spring 4 to create a simple application. Recently, I'm adding Spring Security 3 to the project but always get the Error Code 302 ( so it redirect to home page always ). Here is my SecurityCo...
Rollerskate asked 18/8, 2014 at 6:34

8

Spring 4.1 instantiates a Jackson ObjectMapper instance. I have reason to want to @Autowire that instance into one of my controllers: The controller does some minor JSON parsing of its own using Ja...
Canvass asked 5/5, 2015 at 17:56

4

Solved

As mentioned in the title I can't update my webapp to Spring Boot 2.6.0. I wrote my webapp using Spring Boot 2.5.5 and everything works perfectly. If I update the pom.xml file with this new tag: &l...
Chancre asked 22/11, 2021 at 23:49

4

Solved

I've got a requestParam that takes in a date (ie. 2017-01-24T06:00:00.000Z). I'm using DateTimeFormat to format it into a date to pass into my controller. @DateTimeFormat(iso = DateTimeFormat.I...
Luddite asked 27/1, 2017 at 19:33

4

I am trying to find out the number of database tables the application I am maintaining, uses. I have this in my appContext.xml <context:component-scan base-package="com.foo, com.bar" use-defa...
Caulfield asked 24/3, 2014 at 0:45

2

I'm learning about Spring MVC with Java configuration (no xml) and I have a simple question. I see 2 approaches of making Spring bean configuration: approach 1: @Configuration @EnableWebMvc @Comp...
Mealworm asked 1/7, 2019 at 9:30

2

Solved

I have a CustomerController.java: package com.satisfeet.http; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springf...
Visitation asked 8/10, 2014 at 8:15

6

Solved

How can I print date and time is specified timezone with Thymeleaf? Something like: <span th:text="${#dates.format(myDate, 'yyyy-MM-dd HH:mm', 'PST')}">2010-01-01 16:30</span>
Rework asked 30/3, 2014 at 11:19

4

Solved

Let's say I have a Spring controller. @RequestMappin("/path") public MyController { } As stated, default scope of the controller is Singleton. I know that I can autowire request in REQUEST scop...
Tetragrammaton asked 20/2, 2015 at 22:0

© 2022 - 2024 — McMap. All rights reserved.