[SOLVED] Spring Java include interface implementation after compilation

So you need to be able to provide an interface in your main project and then allow users to implement this interface when they want and to be able to feed the implementation to your main project.

1. Build your implementation with maven
2. Take the resulting jar from target and copy it into your impl folder under your main project target folder
3. Start your project with:

java -classpath "demo-0.0.1-SNAPSHOT.jar;imp\*" demo.Application
Advertisements

One thought on “[SOLVED] Spring Java include interface implementation after compilation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s