Quantcast
Viewing latest article 3
Browse Latest Browse All 11

How to autowire class in Maven multi module Spring web app?

I am working on application which contains Maven multi module projects. When I try to @Autowire a service class from another module I’m getting java.lang.NoClassDefFoundError: Parent Project Pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test.simple-project</groupId> <artifactId>simple-parent</artifactId> <version>1.1</version> <packaging>pom</packaging> <modules> <module>module-x</module> <module>module-y</module> </modules> <dependencyManagement> <dependencies> ... </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.5</source> […]

The post How to autowire class in Maven multi module Spring web app? appeared first on BlogoSfera.


Viewing latest article 3
Browse Latest Browse All 11

Trending Articles