Can we implement a Java library by using Spring Boot?
<p>As guided by the thread's name, I would like to create a JAVA library by using Spring Boot. I have found this thread: <a href="https://stackoverflow.com/questions/35589437/creating-a-library-jar-using-spring-boot">Creating a library jar using Spring boot</a>. However, that thread's objectives seem to be solved by implementing it as a REST API. </p>

<p>Currently, I am developing a Spring-based JAVA library by using Spring Boot. And, I have tried to package as a jar file and let another JAVA application to use it in term of a JAVA library. Unfortunately, I found that when the caller application invokes some methods of the added library, <strong>configurations which are defined inside the library do not work at all</strong>.
It also shows an error like "<strong>CommandLineRunner does not exist</strong>".</p>

<p>For more information, a snippet of the pom.xml file is shown below. According to the configuration, I do not include dependencies for web applications.</p>

<pre><code>&lt;parent&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
    &lt;version&gt;1.3.3.RELEASE&lt;/version&gt;
&lt;/parent&gt;

&lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
        &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.assertj&lt;/groupId&gt;
        &lt;artifactId&gt;assertj-core&lt;/artifactId&gt;
        &lt;version&gt;2.3.0&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
&lt;/dependencies&gt;

&lt;build&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
</code></pre>

<p></p>