Questions tagged [spring-4]

Version 4.x of the Spring Framework

Use for general Spring related questions. This tag is for questions that are specific to versions 4.x only.

618 questions
9
votes
1 answer

Interceptor for not existing request mapping with java configuration

I have a configuration class, which extends WebMvcConfigurationSupport and I have added interceptors like this: @Override public void addInterceptors(InterceptorRegistry registry) { …
maszter
  • 3,680
  • 6
  • 37
  • 53
9
votes
2 answers

How to broadcast a message using raw Spring 4 WebSockets without STOMP?

In this great answer https://stackoverflow.com/a/27161986/4358405 there is an example of how to use raw Spring4 WebSockets without STOMP subprotocol (and without SockJS potentially). Now my question is: how do I broadcast to all clients? I expected…
TMG
  • 2,620
  • 1
  • 17
  • 40
9
votes
5 answers

How to do I deploy a Spring app using Postgresql to Heroku using Spring Boot?

I am evaluating Spring 4 on Heroku and I am so far very impressed with both. However, I am having trouble getting my Spring Boot app to run on Heroku. Everything is working fine, except Postgresql (I just get Connection Refused errors). The…
Paul Drummond
  • 6,043
  • 6
  • 30
  • 38
9
votes
2 answers

jetty 9 + JDK 8 + spring 4 Annotations

After upgrading to JDK 8 , the jetty 9 is no longer able to scan the spring annotations : I get the following error : MultiException[java.lang.RuntimeException: Error scanning file ApplicationInitializer.class, java.lang.RuntimeException: Error…
SurMan
  • 271
  • 10
  • 22
9
votes
2 answers

SpringMVC: Inconsistent mapping behavior depending on url extension

I have a RESTful spring based endpoint to get assets stored in a db to a javascript editor. The relevant parts boil down to: @RestController @RequestMapping(ThemeEndpoint.ENDPOINT_NAME) public class ThemeEndpoint { public static final String…
Dirk Lachowski
  • 3,121
  • 4
  • 40
  • 66
8
votes
2 answers

Swagger UI does not list any of the controller/end points though I am able to see the json under v2/api-docs endpoint

I am not able to get my Swagger UI to work with my project. Swagger UI comes up fine but it does not list any of my REST controllers. I am using SPRING 4.2.6.RELEASE and Swagger 2.5.0 . My rest services are deployed to Tomcat 7.0.54 . When Tomcat…
serah
  • 2,057
  • 7
  • 36
  • 56
8
votes
1 answer

Use SimpMessagingTemplate without creating a web socket message broker Spring 4

Can I send a message to a message broker using SimpMessagingTemplate#convertAndSendToUser or SimpMessagingTemplate#convertAndSend methods without settings up a websocket message broker using @EnableWebSocketMessageBroker? What I'm trying to do is…
Susitha Ravinda Senarath
  • 1,648
  • 2
  • 27
  • 49
8
votes
2 answers

Spring 4 MVC - Rest service - use default values in beans

I am using Spring 4.1.4 and implementing a simple REST service. I do have a POST method which gets a Person object as request. @ResponseStatus(value = HttpStatus.CREATED) @RequestMapping(value = "", method = RequestMethod.POST, headers =…
K.E.
  • 818
  • 2
  • 12
  • 28
8
votes
1 answer

MappingJacksonHttpMessageConverter not found with Spring4

I migrated my Spring framework from 3.x to 4.2.RELEASE but, when I start the jUnit I'm getting this error: Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL…
Andrea Girardi
  • 4,337
  • 13
  • 69
  • 98
8
votes
2 answers

Spring 4 cannot execute Java 8 default methods

I have defined interface public interface MyInterface { default void setOrder(int a){ } default int getOrder(){return 123;} } and implementation public class MyInterfaceImpl implements MyInterface {} In my spring configuration file I have…
Adam Szecowka
  • 675
  • 3
  • 8
  • 20
8
votes
2 answers

Customize Spring @RequestParam Deserialization for Maps and/or Nested Objects

@RestController class MyController { @RequestMapping(...) public void test(Container container) { ... } } Spring by default uses Dot-Notation to deserialize a nested @RequestParam: class Container { A a; } class A { String…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
8
votes
0 answers

@PropertySource working with spel (systemEnvironment and systemProperties)

I have in src/main/resources the following files bpp-dev.properties bpp-prod.properties bpp-test.properties Through my STS I can define the key envB, it in two places how a VM argument such as -DenvB=dev how an Environment such as Variable envB…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
8
votes
3 answers

Spring 4 Exception Handling : No suitable resolver for argument

Problem Statement Migration to Spring 4 from Spring 3 induces some exceptions in exception handling flow. The Exception says No suitable resolver for argument in the org.springframework.web.method.support.InvocableHandlerMethod class. So whenever…
Santosh Joshi
  • 3,290
  • 5
  • 36
  • 49
8
votes
1 answer

How to send received jsessionid via spring 4 resttemplate

I'm writing an messenger with JavaFX and Spring4 on client-site and Spring4 on server-site. I secured the server with spring-security 3.2. Now my Problem: I have a loginpage on the client witch sends the login information to spring-security and…
Bloodline
  • 101
  • 1
  • 8
8
votes
1 answer

Spring 4 WebSocket Remote Broker configuration

I managed to create simple Websocket application with Spring 4 and Stomp. See my last question here Then I tried to use remote message broker(ActiveMQ). I just started the broker and changed…
Evgeni Dimitrov
  • 21,976
  • 33
  • 120
  • 145