spring-mvc Questions

4

Solved

I have a simple handler in my controller which returns a message @RequestMapping(value = "/message") @ResponseBody public Message get() { return new Message(penguinCounter.incrementAndGet() + " p...
Longwise asked 28/3, 2014 at 23:51

6

Solved

How can I add a "global" variable such as username to be used all around my template context? Currently I am setting these explicitly to each ModelAndView object in my TemplateController.
Roselinerosella asked 8/5, 2015 at 10:27

3

Solved

Consider I have a controller method get() which calls a few service methods working with database. Is it correct to make the entire controller method transactional or just every service method? I...
Changeling asked 16/12, 2010 at 16:7

5

I am working with a Spring boot application. I have a rest controller that returns Callable. @GetMapping("/fb-roles") @Timed public Callable<List<FbRole>> getAllFbRoles() { log.debug(...
Karachi asked 19/9, 2018 at 3:49

7

Solved

Example JSON (note that the string has trailing spaces): { "aNumber": 0, "aString": "string " } Ideally, the deserialised instance would have an aString property with a value of "string" (i.e. ...
Shippee asked 27/7, 2011 at 22:54

3

Solved

I want to use @Autowire with a Filter. So I define my filter in the SecurityConfig as below: @Override protected void configure(HttpSecurity http) throws Exception { http.sessionManagement().s...
Servile asked 4/9, 2016 at 6:31

3

Solved

I precise that I am a french student in 1st year of Java Developper. I'm developing a little multi-module app using: Spring Boot, Spring security, Hibernate, Spring Data, Spring MVC and Thymeleaf...
Jobholder asked 16/11, 2018 at 15:25

9

Solved

Guided by Serving Web Content with Spring MVC, I'm creating a Spring Boot web application that I can run using both the embedded Tomcat instance as well as on a standalone Tomcat 8 server. The app...
Derange asked 19/9, 2016 at 7:19

11

Solved

I am working on Spring MVC controller project in which I am making a GET URL call from the browser - Below is the url by which I am making a GET call from the browser - http://127.0.0.1:8080/test...
Checkerwork asked 5/4, 2014 at 6:21

3

Solved

I am using this dependency in a spring boot application: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> &lt...
Hydrosphere asked 20/3, 2018 at 14:6

3

Solved

Using Spring Data REST with JPA in version 2.1.0. How can I configure the pagination in order to have the page argument starting at index 1 instead of 0 ? I have tried setting a custom HateoasPag...
Filippa asked 7/5, 2014 at 14:55

21

I have set up a spring boot project using the Spring Initializer, I tried several times to create a new project or play with the dependencies, everything seems to be in place. I am using STS(Sprin...
Camper asked 23/10, 2015 at 11:18

4

Solved

I have created a web app using spring boot and freemarker and implemented interceptor(HandlerInterceptorAdapter). Inside the interceptor, when user is not logged then it will redirect to login pag...
Lanell asked 24/6, 2017 at 19:43

4

Solved

According to the current doc (5.0.0.RELEASE) Spring Webflux supports validation when working with annotated controllers: By default if Bean Validation is present on the classpath — e.g. Hiberna...
Sanchez asked 1/10, 2017 at 2:9

16

Solved

I am getting below exception when I am trying to run a Spring MVC application using Spring boot... ContainerBase: A child container failed during start java.util.concurrent.ExecutionException: org...

9

So I'm a newbie to Spring and I'm trying to get file upload working for my project (I'm using Spring Tool Suite btw.) and when submitting a form all I'm getting is: HTTP Status 500 - Could not p...

6

I'm trying to write a unit test for a Controller in a Spring Boot application. The application runs smoothly, my problem is with running its tests. Here is the test code: @RunWith(SpringRunner.cl...
Rank asked 28/6, 2017 at 17:35

3

Solved

I'm using spring boot 2.1.1 version and use @EnableWebFlux but I got some errors. Errors are org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr...
Girt asked 7/1, 2019 at 6:44

3

Solved

I am trying to carry JSON data in an HTTP GET request message, but my Spring MVC server can't seem to retrieve the JSON data from the GET request body.
Forester asked 22/1, 2016 at 22:20

7

Solved

I have a List of entities. How do I convert it to Page Object using Spring MVC 4 and Spring Data JPA?
Bloodhound asked 10/5, 2016 at 11:4

7

Is there any way to select current value in dropdown list by Spring MVC by <form:options>?
Bezel asked 26/8, 2011 at 9:4

20

Solved

I am trying to call REST endpoints on one application (spring-boot application) from another (angularjs). The applications are running on the following hosts and ports. REST application, using sp...
Trinatrinal asked 31/8, 2015 at 20:25

8

Solved

I'm trying to distinguish between null values and not provided values when partially updating an entity with PUT request method in Spring Rest Controller. Consider the following entity, as an exam...
Rosenthal asked 17/7, 2016 at 18:10

3

Solved

I'm trying to add a matrix parameter (or matrix variable) to my Rest Controller using SpringMVC (from Spring boot 1.2.3.RELEASE) Here is my code : @RestController public class SubAgentsController ...
Amends asked 29/5, 2015 at 22:4

6

Solved

While running spring boot with h2 database and JPA i am getting below error. org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement at org.hibernate.tool...
Poleax asked 22/10, 2018 at 4:8

© 2022 - 2024 — McMap. All rights reserved.