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
0
votes
1 answer

Spring Web Flow 2.5.1.RELEASE with JSF2.2 flow not executed

I am struggling with this issue for 5 days now and I don't see where to look for a solution. I upgraded a JSF application from 2.1 to 2.2 with Mojara 2.1.17 to 2.2.14, including Icefaces from 3.2.0 to 4.2.0. I also upgraded Spring 3.2 to 5.1.2 and…
akuma8
  • 4,160
  • 5
  • 46
  • 82
0
votes
3 answers

Can't map second level json value with Spring Webflux Webclient

I am consuming the public API for crypto currencies in Mexico: https://api.bitso.com/v3/available_books/ that returns a json like this one: "success": true, "payload": [ { "book": "btc_mxn", "minimum_price":…
chuuck
  • 81
  • 1
  • 6
0
votes
1 answer

Zero length part of URL in Spring controller RequestMapping PathVariable breaks resolution

I'm trying to make an app's REST API more RESTful and it feels like I'm not using the Spring RequestMappings in the way intended. I have a single GET end point for doing reads: @RequestMapping(value = "thing/{thingName}", method =…
Adam
  • 5,215
  • 5
  • 51
  • 90
0
votes
1 answer

Couldnt read app configuration in PCF from bitbucket after upgrading spring & java versions

Pivotal Spring cloud config service doesnt work with Java 11 and spring boot 2.1.1.RELEASE and spring web: 5.1.3.RELEASE. I am getting "Error requesting access token". Any pointers to resolve this issue?
Minisha
  • 2,117
  • 2
  • 25
  • 56
0
votes
1 answer

request forwarding with ServletHttpHandlerAdapter spring web-flux in servlet 3.1 container

As per documentation on servlet 3.1 container ServletHttpHandlerAdapter can be registered as a servlet and can support nio. I need to forward request to some other resource as below…
Gajendra Kumar
  • 908
  • 2
  • 12
  • 28
0
votes
1 answer

Error thrown when call post rest api with big data size

I have a problem. When I call a post rest api with big data (about 35 megabyte in body) this exception is thrown: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "x": Software caused connection abort: recv…
0
votes
1 answer

Inject property value into annotation field

I'm developing my rest API and I would want to have a dynamic list of endpoints. I'm using following approach: @Controller("/") public class Resource { @PostMapping(path = {"request1", "request2"}) public Mono
Alex
  • 1,940
  • 2
  • 18
  • 36
0
votes
2 answers

@Controller class is not redirecting to the specified page

This is my Controller class @Controller public class PageController { @GetMapping(value="/") public String homePage() { return "index"; } } And I also have a RestController class @RestController public class MyRestController…
Gautham M
  • 4,816
  • 3
  • 15
  • 37
0
votes
2 answers

How to get all converters and formatters that register in spring?

I want to the behaviors of serialization and deserializion consistent in the Spring ConverterSPI/Formatter and JsonHttpMessageConverter/XmlHttpMessageConverter. So,i try to register all converters in Spring ConverterSPI to global configuration…
caotc
  • 21
  • 4
0
votes
2 answers

How to ignore any http content headers on Spring @RestController?

I have some webservice endpoints that should offer json data by default. Therefore configuring as follows: @Configuration public class ContentNegotiationConfiguration implements WebMvcConfigurer { @Override public void…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
0
votes
2 answers

How to get absolute webserver path in a Spring @RestController?

I want my @RestController to return an absolute url path to my webserver. But the path should not be hardcoded, instead derived from the application server where the spring application runs in. @RestController public class FileService { …
membersound
  • 81,582
  • 193
  • 585
  • 1,120
0
votes
2 answers

Update/notify other User in Spring Web

I have some design/implementation issue that I just can't wrap my head around it. I am currently working on a text-based game with multiple players. I kind of understand how it works for Player-to-Server, I meant that Server sees every individual…
user1778855
  • 659
  • 1
  • 11
  • 29
0
votes
1 answer

Override AuthorizationEndpoint with custom implementation

I'd like to override spring's default AuthorizationEndpoint and provide my own on /oauth/authorize. I wrote my own controller @RestController @RequestMapping("oauth/authorize") public class AuthorizationController { @RequestMapping public…
Ben
  • 3,989
  • 9
  • 48
  • 84
0
votes
1 answer

Does spring REST support look up by resourceid which starts with period /resources/{resourceid}

I am working on REST api which has lookup by resourceid and resourceid starts with . or / or //. I am able to handle cases where it starts with / or contains / but not resources whos identifiers start with . eg: /resources/.ABC-A Im looking some…
R C
  • 21
  • 1
  • 7
0
votes
1 answer

What dependency am I missing for org.springframework.mock.web?

I am trying to use MockMultipartFile in existing source code for Egads but I keep getting this error: package org.springframework.mock.web does not exist Here is the updated pom file:
Ryan Fasching
  • 449
  • 2
  • 11
  • 21