Spring There is no such bean when using * classpath

using spring 2.5.6 for a standalone application.

I recently switched from java -cp dir/a.bar:dir/b.jar:dir/c.jar to

 java -cp dir/* 

when i do this i get

 Could not process key 'dealerMasterSolrServer.baseURL' in PropertyOverrideConfigurer; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dealerMasterSolrServer' is defined 

I see from the logs that he is trying to set an override before loading the bean, this only happens when I set the class path * , which works fine when I use separate banks. Any help is appreciated

Os Redhat 6.1 2.6.32-131.0.15.el6.x86_64 Java version 1.6.0_34-b04

+4
source share
1 answer

dir/* expands to dir/a.jar dir/b.jar dir/c.jar , i.e. you are missing a colon : which separate entries in the classpath.

Take a look: Using bash, how do you make the classpath of all the files in a directory for a solution.

+2
source

Source: https://habr.com/ru/post/1486890/


All Articles