简体   繁体   中英

How to set Spring Classpath

在sfs控制台上出错

I am using IntelliJ and jus checked out working code from the svn.I am struggling to run the jar.

Its a simple core java Spring project.

Since I get the above error.I understand that the spring path is not set fine. How do I handle it.?

 private ApplicationContext appContext = new AnnotationConfigApplicationContext(ApplicationRepositoryConfiguration.class);

Application context file is a bean class here (@Bean annotation is used). I am not using a xml file.

It seems like you are running your project from command line. Run following command :

java -classpath spring.jar;spring-sec.jar,......so on com.example.UrMainClass

while specifying jar in command, make sure you provide complete path of jar. Also check this link https://stackoverflow.com/a/10122038/1065180

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM