Top "Spring-annotations" questions

A common placeholder for issues related to the use of annotations with the Spring framework

What is the proper annotation since @SpringApplicationConfiguration, @WebIntegration, is deprecated in Spring Boot Framework?

What is the proper annotation since @SpringApplicationConfiguration and @WebIntegration are deprecated as of Spring Boot Framework 1.4? I'm trying to play …

java spring-boot junit spring-annotations
Dynamically changing the @ResponseStatus in annotation driven Spring MVC

I am really not sure if this is feasible using Spring 3.2 MVC. My Controller has a method declared as below: @…

spring-mvc spring-annotations
spring 3.1 @Cacheable example

I am new to spring annotation and i want to create a sample example which shows the use of @Cacheable …

java caching spring-annotations
Spring MVC - HTTP status code 400 (Bad Request) for missing field which is defined as being not required

I have Spring MVC application with this controller method. @RequestMapping(value = "/add", method = RequestMethod.POST) public String addNumber(@RequestParam(value="…

spring spring-mvc spring-annotations
Difference between @EntityScan and @ComponentScan

I am trying to understand the difference here. I see that a class has been annotated with both of them …

spring-boot spring-annotations spring-4 java-annotations
FactoryBeans and the annotation-based configuration in Spring 3.0

Spring provides the FactoryBean interface to allow non-trivial initialisation of beans. The framework provides many implementations of factory beans and …

java spring inversion-of-control spring-annotations
@EnableTransactionManagement annotation with 2 transaction managers

I am using @Configuration annotation for configuration of spring instead of xml file. I am configuring 2 datasources with different session …

java spring spring-3 spring-annotations
Can @PathVariable return null if it's not found?

Is it possible to make the @PathVariable to return null if the path variable is not in the url? Otherwise …

java spring-3 spring-annotations path-variables
How to retrieve JNDI using Spring @Configuration instead of XML configuration

I've started development of a new Spring 3.2.4 application and am trying to use Java based configuration instead of XML files …

java spring spring-annotations
Spring MVC: please explain difference between @RequestParam and @ModelAttribute

I'm new to Spring MVC. Please help me unpack the documentation. Documentation Spring MVC Documentation states (emphasis mine): @ModelAttribute on …

java spring spring-mvc spring-annotations