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
4
votes
3 answers

How to integrate Spring 4 with Apache Tiles 3?

I am using Spring framework version 4 and I get confused which folder to put the XML files, specially the tile definitions and where to find the resolver bean.
Andoy Abarquez
  • 1,119
  • 4
  • 17
  • 30
4
votes
1 answer

Spring 4 and JSF ViewScope

In Spring 3 and JSF 2.0 when we wanted to use the JSF view scope we had to introduce custom ViewScope implementation and instruct Spring to pick it up through CustomScopeConfigurer. Has Spring 4 made any progress in the JSF integration on this…
JanM
  • 1,385
  • 1
  • 15
  • 25
4
votes
1 answer

Import Groovy Bean definition in Spring 4?

I have defined some beans with groovy dsl and tried to add them like i did previously using a xml definition for beans in my dispatcher-servlet.xml: but this is not working. Whats wrong? My bean…
GedankenNebel
  • 2,437
  • 5
  • 29
  • 39
4
votes
5 answers

Spring 4.0.0 backward compatibility

I've searched and couldn't find anything to suggest that Spring 4.0.0 is not fully backward compatible with Spring 3.x. Is that indeed the case?
YaOg
  • 1,748
  • 5
  • 24
  • 43
3
votes
5 answers

Spring @Conditional based on a value in database table

Condition evaluation depends on a value provided in data base table @Component public class XYZCondition implements Condition{ @Override public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { …
csr
  • 63
  • 1
  • 4
3
votes
1 answer

springdoc-openapi + Spring 4 Compatibility

I have an existing Spring 4 API and have successfully integrated springdoc-openapi to generate the OpenAPI 3 spec in JSON/YAML and also display the Swagger UI using springdoc-openapi 1.2.29 and Spring Boot 15.2.2.RELEASE, however there appear to be…
3
votes
0 answers

Trying to configure spring-mvc to use for @ControllerAdvice for GlobalExceptionHandeling in dispatcher-servlet.xml

I need to use @ControllerAdvice for Global Exception Handling in my application. For that i done these changes in my dispatcher I am getting Exception in configuring xmlns:mvc in dispatcher. :( I have tried the configuration with and without…
Monika Tiwari
  • 151
  • 1
  • 2
  • 11
3
votes
2 answers

SEVERE: Async timeout for GET [ Streaming huge data Using Spring MVC 4.3.x, Java 8, Tomcat 7 ]

I am using Spring MVC 4.3.9.RELEASE, Java 8, Tomcat 7 My code is as below, @Controller @EnableWebMvc public class StreamRecordsController { @RequestMapping(value = "/streamrecords/{elementname}", method = RequestMethod.GET, …
Ankur Soni
  • 5,725
  • 5
  • 50
  • 81
3
votes
1 answer

How to write a controller method's signature when url has a parameter data after the slash?

In PHP there is the possibility to recognize a parameter in the address bar by passing it in the controller's method ; for example : http://192.168.2.49/papsp/index.php/meeting/modif/3 In this example the data 3 is taken as parameter value for the…
pheromix
  • 18,213
  • 29
  • 88
  • 158
3
votes
3 answers

@Qualifier is not working

I have 3 data sources that I set up as follows: @Configuration @Component public class DataSourceConfig { @Bean("foo") @ConfigurationProperties(prefix = "spring.datasource.foo") public DataSource foo() { DataSource dataSource =…
Adam
  • 43,763
  • 16
  • 104
  • 144
3
votes
2 answers

How do I verify that an event has been published using Spring, JUnit, and Mockito?

I'm using Spring 4.3.8.RELEASE with JUnit 4.12 and Mockito 1.10.18. I have a service that publishes events ... @Service("organizationService") @Transactional public class OrganizationServiceImpl implements OrganizationService,…
Dave
  • 15,639
  • 133
  • 442
  • 830
3
votes
2 answers

Error creating bean with name 'dataSource' defined in com.vinay.patients.config.AppConfig: Unsatisfied

I am new with Spring 4 framework trying to get string from the embedded HyperSQL database in eclipse sfs but getting this error of Error creating bean with name 'dataSource' defined in com.vinay.patients.config.AppConfig.…
Viney Dhiman
  • 183
  • 1
  • 3
  • 15
3
votes
3 answers

Spring Rest API interceptor add response header on each/every request

I am working with Spring 4 REST API annotation based configuration application. I want to add response header on each/every request once user is authenticate by JWT. I have created interceptor for that which looks as below: public class…
Piyush Chaudhari
  • 962
  • 3
  • 19
  • 41
3
votes
0 answers

Spring-data-rest jacksonHttpMessageConverter doesn't convert nested entity

I am using spring-data-rest-webmvc:2.5.6.RELEASE. My application uses auto configuration to expose all endpoints simple I didn't provide any custom configuration. Consider the following domain classes Order.java public class Order { @Id…
Achaius
  • 5,904
  • 21
  • 65
  • 122
3
votes
0 answers

how to get List of generic type from spring hateoas traverson

Consider my following code. I am trying to get list of objects based on the generic responseType using spring-hateoas Traverson class public ArrayList getList(String path, Class responseType) { String url = decodeURL(host +…
Achaius
  • 5,904
  • 21
  • 65
  • 122