I have an application which should run only on standard JVM – no application servers like JBoss or Tomcat. Is it possible to run it with Spring (I need spring-jdbc) configured normally through applicationContext.xml? I havent’t found any tutorial.
SOLUTION
First part is from the answers below and the second part is (in my case) adding this into pom.xml.
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>package.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
Yes – all you need is JVM to launch java main class that makes use of Spring FW.
here is the example of context.xml and a code that uses it to initialize Spring JDBC:
here is the java code example:
Good luck !