How to inject a custom Spring PropertySource into Environment in a non-web project? -


i have custom propertysource reads external source. inject spring environment in non-web , non-spring-boot project.

i think there ways via applicationcontextinitializer seems specific web application registration involves setting contextinitializerclasses.

my use-case tests in small project require loading app context , need access properties set custom property source. mocking values not option , find if there's way register custom propertysource environment in non-web project?


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)