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
39
votes
2 answers

Error creating bean with name

I'm using SpringMVC for a web app as well as to inject my sessionFactory for Hibernate. When I run my application, I get the following error... Apr 29, 2012 3:18:05 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache…
David
  • 19,577
  • 28
  • 108
  • 128
39
votes
6 answers

Programmatic use of Spring Security

I am using Wicket with the Wicket Auth Project for my presentation layer and I have therefore integrated it with Spring Security. This is the method which is called by Wicket for authentication for me: @Override public boolean authenticate(String…
user14070
38
votes
10 answers

Spring autowired bean for @Aspect aspect is null

I have the following spring configuration:
mogronalol
  • 2,946
  • 8
  • 38
  • 56
38
votes
9 answers

Need Spring version# - only have spring.jar file

I've inherited an app that uses Spring. The original developers are not available. The Spring jar file is just "spring.jar", so there's no version# in the filename to help me. I'd like to download the Spring source corresponding to the jar file. The…
Gary Kephart
  • 4,860
  • 5
  • 39
  • 52
38
votes
5 answers

Creating New Roles and Permissions Dynamically in Spring Security 3

I am using Spring Security 3 in Struts 2 + Spring IOC project. I have used Custom Filter, Authentication Provider etc. in my Project. You can see my security.xml here
user995009
38
votes
6 answers

Spring JUnit Test Error

I am receiving the following error when I attempt to run my Spring JUnit test. I am just trying to get familiar with creating JUnits using the Spring Framework. JUnit Class: package org.xxx.springdao.mongo_datadictionary; import static…
Robert Brooks
  • 701
  • 2
  • 8
  • 12
38
votes
14 answers

What should I learn first, Spring or Hibernate?

I've just started learning Struts and I'm trying to be marketable for a good job as a Java programmer. My next decision would be choosing which to learn next, Spring or Hibernate? Also do you guys have any suggestions or tips for me to be good?…
ajushi
  • 1,237
  • 4
  • 16
  • 28
38
votes
2 answers

How do I instantiate an Object that uses generics with Spring framework?

I have a class that looks like this: class Dao{ ... } I want to do this: new Dao(); from the Spring XML configuration. Can that be done? How?
flybywire
  • 261,858
  • 191
  • 397
  • 503
38
votes
7 answers

How do I force a Spring Boot JVM into UTC time zone?

I saw Force Java timezone as GMT/UTC I tried mvn spring-boot:run -Dexec.args="-Duser.timezone=GMT" mvn spring-boot:run -Dexec.args="-Duser.timezone=UTC" user.timezone=UTC in config/application.properties user.timezone=GMT In the pom.xml: …
Chloe
  • 25,162
  • 40
  • 190
  • 357
38
votes
6 answers

spring-boot-starter-test with JUnit 5

Using spring-boot-starter-test as of 2.0.6 brings in a JUnit 4 dependency. How can I use spring-boot-starter-test (via Gradle), but use JUnit 5 instead, without the JUnit 4 dependency being pulled in? Here's a part of the dependency output from…
user605331
  • 3,718
  • 4
  • 33
  • 60
38
votes
6 answers

Spring IoC and Generic Interface Type

I'm trying to use Spring IoC with an interface like this: public interface ISimpleService { void someOp(T t); T otherOp(); } Can Spring provide IoC based on the generic type argument T? I mean, something like this: public class…
Miguel Ping
  • 18,082
  • 23
  • 88
  • 136
38
votes
3 answers

Deserialize a json array to objects using Jackson and WebClient

I have a problem during the deserialization of a json array using Spring. I have this json response from a service: [ { "symbol": "XRPETH", "orderId": 12122, "clientOrderId": "xxx", "price": "0.00000000", …
Justin
  • 1,149
  • 2
  • 19
  • 35
38
votes
1 answer

How to handle Internal server error (500) on spring rest API?

Good day, I am working on spring rest api and i would like to sure everything is working fine. I would like to log abnormal behaviors like nullPointerException or database connection error or any Exception that could raise and not handled or not…
user3454581
  • 532
  • 1
  • 4
  • 11
38
votes
2 answers

@Import vs @ContextConfiguration in Spring

Is there any difference in usage of the annotations? Both the annotations allow to use multiple @Configuration classes to create an ApplicationContext. From their docs @ContextConfiguration seems to be more suitable for test configuration and comes…
Dmitry Senkovich
  • 5,521
  • 8
  • 37
  • 74
38
votes
4 answers

Spring boot Test fails saying, Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

Test Class:- @RunWith(SpringRunner.class) @SpringBootTest(classes = { WebsocketSourceConfiguration.class, WebSocketSourceIntegrationTests.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { …
Devas
  • 1,544
  • 4
  • 23
  • 28