get all dependencies with versions in spring-context 4.3.6.Release - spring

How to get the list of all dependencies with versiosn used in spring-context 4.3.6 Release ? I do see that for spring boot in spring.io page but not for spring-context

If you are using maven adding this will resolve all dependencies
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>
It has following dependencies:
org.springframework:spring-context:4.3.6.RELEASE
org.springframework:spring-aop:4.3.6.RELEASE
org.springframework:spring-beans:4.3.6.RELEASE
org.springframework:spring-core:4.3.6.RELEASE
commons-logging:commons-logging:1.2
org.springframework:spring-expression:4.3.6.RELEASE

Related

Problem with upgrading of libraries (spring) in JAVA

My project contains a lot libraries and I want update following:
spring from 5.0.10.RELASE to 5.3.18 or higher
spring-content
spring-core
spring-beans
spring-aop
spring-context-support
spring-orm
spring-jdb
spring-web
spring-webmvc
spring-tx
spring-data-jpa from to 2.3.2 or higher
spring-data-commons from to 2.3.2 or higher
But when I changed version my project durring start has a many errors.
How can I check that these verions libraires are compatible with other (hibernate, log4j etc..)
remove all version tags of spring in your pom and create a dependency management as following:
<dependencyManagement>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>5.2.9.RELEASE</version>
<type>pom</type>
</dependency>
</dependencyManagement>

Spring 4 does not import EhCache

While migrating a project from Spring 3 to Spring 4 (using IntelliJ and Maven), I encountered a problem with this imported EhCache package:
Error:(13,40) java: error: package org.springframework.cache.ehcache does not exist
Analyzing the problem, I found that Spring 3 was importing the ehCache package from spring-context-support which is included with maven's spring-core dependency.
Spring 4's spring-core does not include the spring-context-support which contains the ehcache package, so I manually added to the POM the dependency for spring-context-support as such:
pom.xml
<spring.version>4.3.25.RELEASE</spring.version>
<ehcache.version>2.5.0</ehcache.version>
(...)
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
(...)
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>
However, the dependency is not being imported at all. Only the spring-context lib gets imported which does not contain the ehCache package:
Spring 3:
Spring 4
Things I've tried:
mvn clean install
using IntelliJ to re-import maven dependencies
deleting .idea folder and restarting IntelliJ to force dependency imports
deleting the .m2 folder
What am I doing wrong here? How do I use EhCache with spring 4 and maven?
I think for ehcache the dependency should be
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.8.1</version>
</dependency>
when you check here, it indicates that the artifact has been moved to the one mentioned above.
The most likely explanation is that you Maven setup is not correct.
Could you run mvn dependencies:tree in the project where you added spring-context-support version 4.3.25?
That will tell you whether or not Maven sees that dependency.
If it does not, I would check which file you edited vs. which project you are testing.

org.springframework.web.servlet not found in maven

I am trying to download the org.springframework.web.servlet using maven dependency
but maven could not download it.i want to know is this dependency is there in maven or not
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.web.servlet</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
or spring has changed its dependency or can we use some alternate dependency for it.please suggest
The package org.springframework.web.servlet is contained in the spring-webmvc module. Use this dependency:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>`
Update: Since this post is quite old, please check for newer versions of the spring framework. Release 3.1.1.RELEASE is quite out-dated.

What version of "mysql-connector-java" be use for Spring sts release 3.2.3?

Am using sts release version 3.2.3.for jdbc connection, i have given the dependency
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.2.3.RELEASE</version>
</dependency>
Its throwing error:
java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.needsRefresh(Lorg/springframework/beans/factory/annotation/InjectionMetadata;Ljava/lang/Class;)Z
Some jar files i have used seems to be mismatch .
Can somebody please guide me which version of "mysql-connector-java" be used for spring 3.2.3 release ?? And how to know which version of jars i should used??
Thanks
The needsRefresh method was added in spring 4.0.x and it can't be found in the 3.0.x version.

What is the name of spring-webmvc on Spring Enterprise Bundle Repository?

Are spring-webmvc on Maven and org.springframework.web.servlet on EBR the same? I can't seem to find spring-webmvc on Spring's EBR.
Maven:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
Spring EBR:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.web.servlet</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
According to the official Spring documentation, the bundle's symbolic name is derived from the main package root, e.g. org.springframework.beans or org.springframework.web.servlet. Since one of the core classes of Spring MVC, i.e. org.springframework.web.servlet.DispatcherServlet, sits in the org.springframework.web.servlet package, the bundle is named org.springframework.web.servlet.

Resources