Questions tagged [spring]

The Spring Framework is an open-source framework for application development on the Java platform. At its core is rich support for component-based architectures, and it currently has over twenty highly integrated modules.

The Spring Framework is an open-source application framework for the Java platform.

Spring is a non-invasive, versatile, robust framework.

Spring framework complements the Java EE APIs but is not a replacement for Java EE. It reduces most boilerplate code, reducing the burden on developers.

Spring provides services and functionalities 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 more uncomplicated and more straightforward. While some Spring modules are simple wrappers and helpers over the Java EE specifications, most go far beyond the Java EE specification.

The latest Spring Framework Reference Documentation can be found here.

Spring version history:

Version    Date   
5.2.x    Dec, 2020
5.1.x    Sep, 2018 
5.0.x    Sep, 2017 
4.3.x    Jun, 2016 
4.2.x    Jul, 2015 
4.1.x    Sep, 2014 
4.0.x    Dec, 2013 
3.2.x    Dec, 2012 
3.1.x    Dec, 2011 
3.0.x    Dec, 2009 
2.5.x    Nov, 2007 
2.0.x    Jun, 2006 
1.2.x    Mar, 2005 
1.1.x    Jul, 2004 
1.0.x    Feb, 2004 

Frequently Asked Questions

People often ask about the following Spring topics:

Guides:

Video tutorial on Spring Framework

Examples:

Blog:

Related tags

More information:

Official Logo:


Spring logo

208702 questions
38
votes
2 answers

@Transactional in super classes not weaved when using load time weaving

The project I am working on has a similar structure for the DAOs to the one bellow: /** * Base DAO class */ @Transactional public class JPABase { @PersistenceContext private EntityManager entityManager; public void persist(Object…
38
votes
2 answers

Repository query with a List parameter in Spring Data MongoDB

I have the following POJO. @Document(collection = "questions") public class Question { @Id private String id; public List getTags() { return tags; } public void setTags(List tags) { this.tags =…
Marchev
  • 1,340
  • 1
  • 10
  • 11
38
votes
4 answers

Configure ViewResolver with Spring Boot and annotations gives No mapping found for HTTP request with URI error

I'm trying to make "hello world" application with gradle, spring boot and spring mvc with the simplest view resolver and html. I started from the thymeleaf spring boot example and I just wanted to remove thymeleaf to make a simpler mvc application…
otognan
  • 1,736
  • 3
  • 16
  • 20
38
votes
2 answers

HttpServletRequestWrapper, example implementation for setReadListener / isFinished / isReady?

I am trying to adapt a HttpServletRequestWrapper (see How to read request.getInputStream() multiple times) to be able te read the HTTP Post body after consuming it in a filter. Now I run into a challenge on how to implement the ServletInputStream.…
Marco
  • 15,101
  • 33
  • 107
  • 174
38
votes
3 answers

Spring Web MVC: Use same request mapping for request parameter and path variable

Is there a way to express that my Spring Web MVC controller method should be matched either by a request handing in a ID as part of the URI path ... @RequestMapping(method=RequestMethod.GET, value="campaigns/{id}") public String…
ngeek
  • 7,733
  • 11
  • 36
  • 42
38
votes
5 answers

Spring: return @ResponseBody "ResponseEntity>"

In controller I create json array. If I return List it is ok: @RequestMapping(value="", method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody List getAll() { List entityList =…
martin
  • 1,707
  • 6
  • 34
  • 62
38
votes
4 answers

Spring JpaRepostory delete vs deleteInBatch

What is the difference between delete(...) and deleteInBatch(...) methods in JpaRepostory in Spring ? The second one "deletes items in one SQL statement", but what does it mean from the application/database perspective ? Why exists two different…
kulatamicuda
  • 1,603
  • 2
  • 21
  • 40
38
votes
2 answers

Multiple DataSource and JdbcTemplate in Spring Boot (> 1.1.0)

I would like to inject a specific JdbcTemplatein a Spring Boot project. I tried to follow this example for multiple DataSourceconfiguration : http://spring.io/blog/2014/05/27/spring-boot-1-1-0-m2-available-now My code does compile and run, but only…
Xavier
  • 423
  • 1
  • 4
  • 8
38
votes
1 answer

Spring 4 and Java 8 Invalid byte tag exception

I am trying to run a simple JUnit test using Spring and Java 8 JDK: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:applicationContext.xml"}) @WebAppConfiguration public class UserServicesTest{ @Test public…
rayman
  • 20,786
  • 45
  • 148
  • 246
38
votes
2 answers

Get spring application environment in thymeleaf

My Spring Boot application runs with 3 configurations: application.properties --> for development environment application-test.properties --> for test environment application-production.properties --> for production environment How is it possible…
occurred
  • 490
  • 1
  • 5
  • 13
38
votes
3 answers

Thymeleaf not displaying Spring form error messages

I'm migrating a Spring jsp application to Thymeleaf but having problems displaying form errors. I'm using the SpringTemplateEngine and ThymeleafViewResolver and rendering of templates works. Also form values are populated in form input fields. The…
Marcel Overdijk
  • 11,041
  • 17
  • 71
  • 110
38
votes
2 answers

org.springframework.data.mapping.PropertyReferenceException: No property catch found for type

I have a issue with Spring Data repositories. When I deploy, I get an exception and it's because Spring Data tries to derive dynamically the method, but can't find in the Entity the corresponding property. How can I put a custom method in the Custom…
Andrea T
  • 3,035
  • 4
  • 23
  • 39
38
votes
11 answers

Spring 3.0: Unable to locate Spring NamespaceHandler for XML schema namespace

My setup is fairly simple: I have a web front-end, back-end is spring-wired. I am using AOP to add a layer of security on my rpc services. It's all good, except for the fact that the web app aborts on launch: [java] SEVERE: Context initialization…
Nick Hristov
  • 905
  • 1
  • 8
  • 17
38
votes
4 answers

Specify default property value as NULL in Spring

I want to define default property value in Spring XML configuration file. I want this default value to be null. Something like this: ...
Ondrej Bozek
  • 10,987
  • 7
  • 54
  • 70
38
votes
3 answers

Spring Security taglib cannot be found

When I put <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> I will recieve the following error: The absolute uri: http://www.springframework.org/security/tags cannot be resolved in either web.xml or the jar files…
Sy Z
  • 441
  • 1
  • 5
  • 10
1 2 3
99
100