Questions tagged [spring-3]

Version 3.x of the Spring Framework, use [tag:spring] for general Spring related questions.

The Spring Framework is an open source application framework for the Java platform. Use for general Spring related questions. This tag is for questions that are specific to versions 3.x only.

It provides services and functionality across the application domain, including a core Inversion of Control container, technology-agnostic data-access and MVC layers, extensive AOP support, task scheduling, and various integration patterns designed to make distributed system development simpler and clearer. While some spring modules are simple wrappers and helpers over the Java EE specifications, the majority of them go far beyond the Java EE specification.

The latest Spring Framework Reference Documentation can be found here.

Frequently Asked Questions

People often ask about the following Spring topics:

###Guides:

Video tutorial on Spring Framework

###Blog:

Related tags

###More information:

762 questions
20
votes
1 answer

Need understanding of spring.handlers and spring.schemas

I have some questions derived from a problem that I have already solved through this other question. However, I am still wondering about the root cause. My questions are as follows: What is the purpose of spring.handlers and spring.schemas? As I…
Viriato
  • 2,981
  • 7
  • 40
  • 54
20
votes
1 answer

How to generate WADL for Spring REST Service

Hi I am working with Spring 3.5.0.Release. I want to generate a WADL for my spring rest service. Is their any functionality in Spring by which i can easily generate the WADL.
Utsav
  • 1,593
  • 4
  • 22
  • 46
20
votes
7 answers

BeanFactory not initialized or already closed - call 'refresh' before accessing beans

I'm trying to add spring security to a regular JSF application. After repeated tries and I'm failing with the following error on tomcat bring-up. Here is the entire stack trace. Any help is appreciated. EDIT: upon further tests, I notice the…
LambeauLeap
  • 285
  • 2
  • 4
  • 11
19
votes
2 answers

Spring MVC: How to remove session attribute?

Example of using @SessionAttributes below. How to clear user session attribute after wizard finished ? In my example after returning to /wizard0 session attribute still exists. I've tried status.setComplete() and session.removeAttribute("user") but…
marioosh
  • 27,328
  • 49
  • 143
  • 192
18
votes
14 answers

No Session found for current thread (Spring 3.1.X and Hibernate 4)

I'm trying to set up my project using Spring 3.1 and Hibernate 4. I've been following some tutorials online. I'm getting a strange error that according to the spring forums should have been fixed with Spring 3.1. Spring Bug Tracker When my…
It Grunt
  • 3,300
  • 3
  • 21
  • 35
17
votes
2 answers

Elegant way to get Locale in Spring Controller

I'm looking for a cleaner way (in Spring 3.2) to get the current locale than explicitly calling LocaleContextHolder.getLocale() at the start of each Controller method. It has to be compatible with Java annotation, as I'm not using the XML config.…
yetimoner
  • 787
  • 2
  • 9
  • 19
17
votes
3 answers

JDBCTemplate queryForMap for retrieving multiple rows

Can I use queryForMap if there are multiple rows returned by the query. For a single row, the below code works fine. public Map retrieveMultipleRowsColumns(String deptName){ return jdbcTemplate.queryForMap("SELECT…
user182944
  • 7,897
  • 33
  • 108
  • 174
17
votes
2 answers

Is there any way to override a bean discovered by component scan?

I have a java configuration class providing fooBean directly and barBean by component scan. @Configuration @ComponentScan(basePackages = { "com.blah" }) public class Config { @Bean public FooBean fooBean { return new FooBean(); …
mmoossen
  • 1,237
  • 3
  • 21
  • 32
16
votes
9 answers

Spring conversion service - from List to List

I have registered a custom conversion service in a Spring 3 application. It works well for POJOs but it does not work on Lists. For example, I convert from String to Role and it works fine, but not for List to List. All kind of…
JohnDoDo
  • 4,720
  • 8
  • 31
  • 47
16
votes
1 answer

List of Spring Runtime Exceptions

Does anyone know where I can find a list of Spring's (3.0.x) runtime exceptions? I'm talking about exceptions like DataRetrievalFailureException; there's a whole set of these runtime exceptions that you can throw.
Vivin Paliath
  • 94,126
  • 40
  • 223
  • 295
16
votes
7 answers

Spring 3 Security: AccessDeniedHandler is not being invoked

I have a spring 3 application with the configurations given below. When any user tries to access a page and he/she isn't logged in, I get an Access is Denied exception with an ugly stack trace. How do I handle this exception and not let it dump out…
Ritesh M Nayak
  • 8,001
  • 14
  • 49
  • 78
16
votes
5 answers

Best practices when using Spring 3 annotations

I'm looking for some best practices when using Spring 3 annotations. I'm currently moving to Spring 3 and from what I've read so far I see a lot of accent placed on using annotations and moving away from XML configuration. Actually what is…
ElenaT
  • 2,600
  • 4
  • 24
  • 41
16
votes
3 answers

Upgrading to springframework.scheduling.concurrent?

As of Spring 3.0 the ScheduledTimerTask is deprecated and I can't understand how to upgrade to org.springframework.scheduling.concurrent.
Rihards
  • 10,241
  • 14
  • 58
  • 78
16
votes
1 answer

Resolve Spring @Value expression in JUnit tests

Here's a snippet of a Spring bean: @Component public class Bean { @Value("${bean.timeout:60}") private Integer timeout; // ... } Now I want to test this bean with a JUnit test. I'm therefore using the SpringJUnit4ClassRunner and the…
Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
16
votes
3 answers

RestTemplate post for entity

My post method gets called but my Profile is empty. What is wrong with this approach? Must I use @Requestbody to use the RestTemplate? Profile profile = new Profile(); profile.setEmail(email); String response =…
pethel
  • 5,397
  • 12
  • 55
  • 86
1 2
3
50 51