This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I 'm trying to access the properties file other than a place where all the application's configuration resides, so I'm trying to use @Environment twice in my applicatiobn. I'm trying to load a properties to implement a email notification functionality to access the properties file using @Environment by Autowiring. But I'm failing while reading the property file using env.getProperty("email.smtp.host")); Getting null in the place of property value when executing the app. Actually, I'm trying to use two Configuration file, is this what blocks me to autowire Environment property ? I tried to replace with @Component and adding email package to componentscan list as well. Can you someone shed some light on this please ?
1. Tried to resolve this by implementing EnvironmentAware interface as below to get the property value using load() but that still didn't help me.
Today is the first day of the rest of your life.
Something must be done about this. Let's start by reading this tiny ad: