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
7
votes
0 answers

How to consume empty collection without HAL response structure in spring-data-rest

I am using spring-data-rest in my application. I configured repositoryRest using configureRepositoryRestConfiguration I added the following two lines in this…
Achaius
  • 5,904
  • 21
  • 65
  • 122
7
votes
1 answer

Spring 4.3.0.RELEASE, Hibernate 5.0.9.Final, missing SessionFactoryImplementor.getProperties method

I am using Spring 4.3.0.RELEASE together with Hibernate 5.0.9.Final in my app and I keep getting java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map; If I update the Hibernate 5.2.0.Final,…
Tomas Repel
  • 93
  • 1
  • 8
7
votes
2 answers

How to target specific handlers with a @ControllerAdvice @ModelAttribute?

I'd like to display a warning message on specific pages 5 minutes prior to a system shutdown. Rather than add it manually to each these pages I created a @ControllerAdvice class with a @ModelAttribute method that adds the message to the Model…
LWK69
  • 1,070
  • 2
  • 14
  • 27
7
votes
6 answers

Getting a Loop Redirect with Spring Security + CAS, but should be working

I'm trying to change a basic application from using only Spring Security to using CAS, to enable SSO. But i'm getting a redirect loop somewhere, and i can't find out what is wrong. I have made two other mock applications, and there's no problem on…
Yuri-M-Dias
  • 610
  • 1
  • 11
  • 25
7
votes
1 answer

multiple @ComponentScan in Spring 4?

I am using Spring 4.16 with Java Annotations, and i want to do something like: @Configuration @ComponentScan(basePackages = "com.example.business", includeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value =…
jscherman
  • 5,839
  • 14
  • 46
  • 88
7
votes
2 answers

Spring 4 WebSocket + sockJS:. Getting "No matching method found" in trace and @MessageMapping handler not invoked

Controller code: @Controller public class SockController { @MessageMapping(value="/chat") public void chatReveived(Message message, Principal principal) { ... LOGGER.debug("chatReveived message [{}]", message); ... …
user3908406
  • 1,416
  • 1
  • 18
  • 32
7
votes
2 answers

env.getProperty not working Spring PropertyPlaceholderConfigurer

I am loading properties file using spring
invariant
  • 8,758
  • 9
  • 47
  • 61
6
votes
1 answer

How to return java8 Stream from jdbc result set

To make best use of the java8 stream and Spring4, I use the Stream API as follows on a JDBC resultSet that comes from Springs jsdbRestTemplate (code shortened and simplified): public T consumeResultStream( String query, …
tkruse
  • 10,222
  • 7
  • 53
  • 80
6
votes
2 answers

Cannot Connect Spring Boot Application to IBM Informix Database

I cannot connect my spring boot application to IBM Informix database. I have added the informix data source in application.yml file. I am using spring 4. I get the following error. no writeable property 'url' in class…
kd0807
  • 660
  • 6
  • 14
6
votes
1 answer

How to handle client abort during request upload?

Given the following application, based on a Spring Initializr template @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } public…
OrangeDog
  • 36,653
  • 12
  • 122
  • 207
6
votes
2 answers

autowired entries are null when using @Scheduled annotation?

Spring version 4.2.0.RELEASE Given following class, config member becomes null when cleanDocumentMirror method is executed by spring. My code is essentially similar to spring example. Its not just this field, but all other autowired fields are…
user871199
  • 1,420
  • 19
  • 28
6
votes
1 answer

how to convert site minder xml configuration using Spring4 Java config

I am converting an old version based Spring application to annotation based Spring4 application. As a first step I converted all xmls to java configuration based annotations. The application is working fine, but the only issue is with the site…
Alex Man
  • 4,746
  • 17
  • 93
  • 178
6
votes
2 answers

Spring 4 : How to map RequestMapping URLs to particular controller

I have written a Spring MVC application with multiple controllers. On the JSP, I have the action on the form:
and the same action…
user3403462
  • 121
  • 2
  • 6
6
votes
5 answers

Simple angularJS GET function with localhost not working

I have a very simple Spring Rest backend that returns JSON data. The restful URL is working in my browser like this: http://localhost:8080/abc/runlist It returns data like so: [ {"stock_num":"KOH19","damage":"Toronto (Oshawa)"}, …
logixplayer
  • 939
  • 2
  • 13
  • 23
6
votes
1 answer

Can I tell spring to ignore query parameters?

If I submit this form: to this url: /AltRT?guid=guidval mapped to this controller method: @RequestMapping(method = RequestMethod.POST) public…
jlars62
  • 7,183
  • 7
  • 39
  • 60