title: spring boot application(profile specific).properties returns null
body: <p>I am trying to load profile specific property file values using springboot to my @webservice class. I followed the below steps,</p>
  
  <p>1) </p>
  
  <pre><code>created application.properties with profile to be active
  spring.profiles.active=dev
  </code></pre>
  
  <p>2) </p>
  
  <pre><code>Created application-dev.properties with following values
  username = XXXXXXX
  password = XXXXXXX
  host = XXXXXXX
  port = XXXXXXX
  welcome.message = Development
  </code></pre>
  
  <p>3) </p>
  
  <pre><code> Created @Springbootapplication class
  </code></pre>
  
  <p>4) </p>
  
  <pre><code>Created @configuration class for appconfig
  </code></pre>
  
  <p>5) Started reading values of application-dev.properties in the appconfig class using</p>
  
  <p>code:</p>
  
  <pre><code>public class AppConfig {
  @Value("${welcome.message}")
   private String welcomeMsg;
   @Profile("dev")
  @Bean
  public MessageSource messageSourceDev() {
  System.out.println("****Dev Profile called*****"+welcomeMsg);
  </code></pre>
  
  <p>when i run from spring tool suite, for the first time welcome message printed successfully in console.</p>
  
  <p>"****Dev Profile called*****Development"</p>
  
  <p>But when I try to read the property values from the @webservice class I created,through soap UI, </p>
  
  <p>Code:</p>
  
  <pre><code>@WebService(serviceName = "SampleIF", endpointInterface   = "com.tc.services.sample.cxf.SampleIF")
  public class SampleIFImpl implements SampleIF {
  @Value("${welcome.message}")
  private String welcomeMsg;
      @Override
  public Contact CreateContract(Details details) {
      System.out.println("****Welcome Message Val*****"+welcomeMsg);
  </code></pre>
  
  <p>Either it fails at appconfig.class by throwing the following exception</p>
  
  <p>1)     </p>
  
  <pre><code>   org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'welcome.message' in value "${welcome.message}"
  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:379)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1348)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:578)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
  at org.springframework.context.annotation.AnnotationConfigApplicationContext.&lt;init&gt;(AnnotationConfigApplicationContext.java:88)
  </code></pre>
  
  <p>2) Or @webservice class with null value</p>
  
  <p>Please help me in resolving the issue. </p>