title: How to use SpringBoot @ConfigurationProperties with Jasypt in properties located outside application.properties
body: <p>I'm using Spring Boot 1.4.2 and use <code>@ConfigurationProperties</code> to load my properties to my property bean like this:</p>
  
  <pre><code>@ConfigurationProperties(prefix="my.prop", locations = "classpath:properties/myprop.properties")
  @Configuration
  public class MyProp {
      private String firstName;
      private String lastName;
      // getters &amp; setters
  }
  </code></pre>
  
  <p>Also I have this property file:</p>
  
  <pre><code>my.prop.firstName=fede
  my.prop.lastName=ENC(MzWi5OXKOja3DwA52Elf23xsBPr4FgMi5cEYTPkDets=)
  </code></pre>
  
  <p>My controller is pretty simple:</p>
  
  <pre><code>@RestController
  public class MyController {
      @Autowired
      private MyProp prop;
  
      @GetMapping("/")
      public String get() {
          System.out.println(String.format("UserConfig - user: %s, lastName: %s", prop.getFirstName(), prop.getLastName()));
  
          return "something";
      }
  }
  </code></pre>
  
  <p>Everything works fine, my properties are loaded and my output is:</p>
  
  <pre><code>2016-11-28 14:36:30,402 INFO  9780 --- [qtp792210014-27] c.c.b.m.c.c.MyController         : [OhxxugGR] UserConfig - user: fede, lastName: ENC(MzWi5OXKOja3DwA52Elf23xsBPr4FgMi5cEYTPkDets=)
  </code></pre>
  
  <p>I confirmed that everything works fine and I wanted to use jasypt to encrypt and use my properties, however I added this dependency to the pom:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.github.ulisesbocchio&lt;/groupId&gt;
      &lt;artifactId&gt;jasypt-spring-boot-starter&lt;/artifactId&gt;
      &lt;version&gt;1.9&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>But jasypt is not decrypting as you can see in the logs. I've read the documentation provided in this <a href="https://github.com/ulisesbocchio/jasypt-spring-boot" rel="nofollow noreferrer">jasypt starter</a> but still no luck.</p>
  
  <p>This is my main class:</p>
  
  <pre><code>@SpringBootApplication
  @EnableEncryptableProperties
  public class ServiceBaseApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(ServiceBaseApplication.class, args);
      }
  }
  </code></pre>
  
  <p>After testing what <a href="https://stackoverflow.com/users/613628/stephane-nicoll">stephane-nicoll</a> pointed in his comment, it seems that Jasypt only picks properties located in <code>application.properties</code>, so how could I use jasypt with properties located outside this file?</p>