Questions tagged [spring-web]

The Spring Web model-view-controller (MVC) framework.

The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale, time zone and theme resolution as well as support for uploading files. The default handler is based on the @Controller and @RequestMapping annotations, offering a wide range of flexible handling methods. With the introduction of Spring 3.0, the @Controller mechanism also allows you to create RESTful Web sites and applications, through the @PathVariable annotation and other features.

Official Documentation

386 questions
1
vote
2 answers

Spring server is not responding to a GET request

I want to create a Spring service that would return a text upon a GET request at http://localhost/version. For this purpose, I wrote this code: Controller @Controller @RequestMapping("/version") class VersionController { …
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
1
vote
2 answers

Dynamically add rows to table in form by using AJAX

I have a form which encloses a table. I want to be able to add rows dynamically to this table by sending an AJAX request and appending the result to the table body. This request should trigger the rendering of a template and add a corresponding…
Lukas
  • 756
  • 7
  • 20
1
vote
1 answer

Spring boot 2 WebClient get context parameter in subscriber

I am using WebClient to call an external API, I am associating a requestId for each request. Once the request is processed and response is received, I am updating some table using the requestId so that I can confirm all the data associated with the…
1
vote
1 answer

why response of restTemplate.exchange return null?

I have blow code and my web service works well but does not return response : ResponseEntity reponse=null; try { reponse = restTemplate.exchange(url, HttpMethod.POST, requestEntity, Object.class); } catch…
1
vote
2 answers

Spring Data JPA and Spring Web Updating Entities Avoiding Associations

I have the following entities: Area Listing They are both many-to-many: An area can have many listings A listing can have many areas Both Area and Listing have other fields like name, domain, etc. I'm using Spring Web RestController as a way to…
George
  • 11
  • 4
1
vote
0 answers

Spring with Ratpack and Actuator

I am building some apis with Spring and Ratpack, using the whole Spring boot and cloud and Ratpack only for http and async-related-stuff. My current problem is the usage of this stack with Actuator. Because since I am running Ratpack and disabling…
Leonardo
  • 11
  • 2
1
vote
1 answer

Finding the fully qualified URL of a function annotated with @RequestMapping

I have been given a Java project to work with, which contains a function to which I need to make a POST request, from an Angular frontend. The function is annotated with: @RequestMapping(value = "/fn", ...) and will be tested on a local server…
rahs
  • 1,759
  • 2
  • 15
  • 31
1
vote
0 answers

com.ibm.wsspi.amm.validate.ValidationException in WAS with spring 3.1.1

I am getting this exception with Websphere 8 + spring 3.1.1 + java 1.6. I am not using AOP in my code and spring bean cong xml is also clean and basic just to initialize spring web context and view resolver for jsp. Please any…
riteshmaurya
  • 166
  • 1
  • 11
1
vote
2 answers

RestTemplate Simple Get Example

Folks... the curl line: curl https://api.storify.com/v1/stories/storify produces a lengthy JSON response from storify. My attempt to translate this to Spring's RestTemplate looks like this: @Test public void test() { RestTemplate template = new…
GeePawHill
  • 29
  • 1
  • 7
1
vote
0 answers

Handle Spring Boot Applications exit code for web application

I have a Spring Boot web application running in docker. org.springframework.boot spring-boot-starter-actuator
boskop
  • 609
  • 5
  • 23
1
vote
1 answer

Is there web debug toolbar for Spring, like in symfony and django?

I'm confused, since Spring has huge ecosystem and not web debug toolbar to show requests, internals info, memory etc. Or am I missing something? I can say that many things work in Java world different then in nodejs/php/django where it is common…
idchlife
  • 554
  • 1
  • 6
  • 16
1
vote
1 answer

Spring Rest template - 204 content in response from webservice

I have a rest service and is consumed using Spring's RestTemplate with Apache HttpClient as, @Autowired public ClientImpl(@Value("${base-uri}") final String baseUrl, @Qualifier("restOperations") RestOperations…
AJJ
  • 3,570
  • 7
  • 43
  • 76
1
vote
3 answers

Spring mvc error while extending generic controller

I have a generic base controller. And a list of controllers extending that generic controller. I has seen some examples, where its possible to extend controllers. But I am getting Caused by: java.lang.IllegalStateException: Ambiguous mapping…
Deepak Agrawal
  • 1,301
  • 5
  • 19
  • 43
1
vote
1 answer

How print json post body with RestTemplate

I need to know, if jackson is doing the correct parse on my class attributes annotated with @JsonProperty, but enabling debug spring options, it does not display the json that was generated in the post. I tried to create some interceptors to do…
Tiago Costa
  • 1,004
  • 4
  • 17
  • 31
1
vote
4 answers

Spring path params with multiple slash

I have a Spring boot app where I have an API that takes other urls as path params. For example: host:port/{eid} is my base path and after this I can have URLs…
BiJ
  • 1,639
  • 5
  • 24
  • 55