Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39482
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Specifying Spring DI XML config file location |
| Date | 2020-06-04 21:07 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <rbc5t6$1f4v$1@gioia.aioe.org> (permalink) |
| References | <rb6u6o$b0m$1@gioia.aioe.org> <rbblns$ig6$1@dont-email.me> |
On 6/4/2020 4:31 PM, Daniele Futtorovic wrote:
> On 2020-06-03 03:25, Arne Vajhøj wrote:
>> If I have some code that does not use Spring DI directly but uses
>> a library that uses Spring DI, then what are my options for
>> specifying what XML config file that library should use?
>>
>> Any class and method:
>>
>> SomeSpringClass.setDefaultConfigURL("...");
>>
>> ?
>>
>> Any property:
>>
>> -Dspring.config.url=....
>>
>> ?
>>
>> Google does not seem to be my friend today.
>
> https://docs.spring.io/spring/docs/5.3.0-SNAPSHOT/spring-framework-reference/core.html#beans-basics
>
> Don't know the details, but `new ClassPathXmlApplicationContext(...)` or
> `new AnnotationConfigApplicationContext(...)` would seem the way to go.
>
> Specifying the location alone (likely) won't help you. You need
> something that starts the engine that will try to read those sources --
> i.e. the ApplicationContext.
That is already being done in the library.
I need a way to control where the library find the XML config
file without hacking the library.
Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Specifying Spring DI XML config file location Arne Vajhøj <arne@vajhoej.dk> - 2020-06-02 21:25 -0400
Re: Specifying Spring DI XML config file location Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-06-04 22:31 +0200
Re: Specifying Spring DI XML config file location Arne Vajhøj <arne@vajhoej.dk> - 2020-06-04 21:07 -0400
Re: Specifying Spring DI XML config file location Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-06-05 23:01 +0200
Re: Specifying Spring DI XML config file location Arne Vajhøj <arne@vajhoej.dk> - 2021-01-04 20:17 -0500
csiph-web