Unable to use spring boot application as a dependency to another spring boot application. Can anyone please point me to the correct source? I want to implement a central logging application using AspectJ (which is again spring boot application ) which will listen to different spring boot applications(maybe 6 other applications) method executions, and it will persist the data into DB.
I was using the below config in pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>exec</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
And add this as dependency on other spring boot application POM.XML file but still getting No qualifying bean of type 'com.client.client.NewClass' available*
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.client.client.NewClass;
@SpringBootApplication
public class DemoApplication implements CommandLineRunner{
@Autowired
private NewClass newClass;
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
@Override
public void run(String... args) throws Exception {
System.out.println(newClass.getValue());`enter code here`
}
}