However, it was removed from Spring 1.5 I believe, so that’s not available. Googling told me to add this annotation:
@PropertySource(“classpath:example.properties”)
But that doesn’t work either. The reason is because:
“In certain situations, it may not be possible or practical to tightly control property source ordering when using @ProperySource annotations. For example, if the @Configuration classes above were registered via component-scanning, the ordering is difficult to predict.”
I think I’ll just leave this example. The video was trying to show all the different ways to get the property, using Profiles and different ways to wire up the beans. Honestly, it’s all a bit of a muddle at this stage, so I’m not going to debug old deprecated code.
I have been a software developer since 2004 and have worked in many different languages. I started off using scripting languages on the web and transitioned into Enterprise Java development. I have worked as a Team Leader and independent contractor in this capacity. I then decided to take a break, before changing direction to create apps for mobile devices. I changed languages and focused more on the business and design side of things for a while. However, I'm getting pretty jaded by the new and shiny, so I am going back to what I know best and retraining in all the new Java ways and really enjoying the process. My Java 8 certification was the start, this blog will tell the rest of the story.
View all posts by backtojavaland