title: Spring Boot (ConfigServer) is restarting all the time
body: <p>we have a very simple Spring Boot Service (<code>@EnableConfigServer</code>) running behind a nginx proxy.</p>
  
  <p>The service basically works, but it is restarting all the time (Context is closed and started continuously).</p>
  
  <p>See the log files here: <a href="http://pastebin.com/GErCF5x6" rel="nofollow">http://pastebin.com/GErCF5x6</a></p>
  
  <p>The setup is basically just one Java Class and the two configs (bootstrap.properties as well as application.properties).</p>
  
  <pre><code>import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
  import org.springframework.cloud.config.server.EnableConfigServer;
  import org.springframework.context.annotation.Configuration;
  
  /**
   * Main Application, which starts the Spring Boot context
   */
  @Configuration
  @EnableAutoConfiguration
  @EnableConfigServer
  public class Application {
  
      @SuppressWarnings("PMD.SignatureDeclareThrowsException")
      public static void main(String[] args) throws Exception {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p><strong>bootstrap.properties</strong></p>
  
  <pre><code>spring.application.name = configserver
  spring.cloud.config.enabled = false
  encrypt.failOnError= false
  encrypt.key= secret
  </code></pre>
  
  <p><strong>application.properties</strong></p>
  
  <pre><code># HTTP Configuration
  server.port = 8888
  
  # Management Configuration
  management.context-path=/manage
  
  # SSH Based Git-Repository
  spring.cloud.config.server.git.uri=git@bitbucket.org:xyz.git
  spring.cloud.config.server.git.basedir = cache/config
  
  security.user.name=ads
  security.user.password={cipher}secret2
  security.basic.realm=Config Server
  </code></pre>
  
  <p><strong>Log-File</strong></p>
  
  <pre><code>11:13:47.105 [qtp1131266554-101] INFO  o.s.boot.SpringApplication - Started application in 0.176 seconds (JVM running for 245.66)
  11:13:47.105 [qtp1131266554-101] INFO  o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@7709b120: startup date [Wed Apr 08 11:13:47 UTC 2015]; root of context hierarchy
  11:13:47.690 [qtp1131266554-51] INFO  o.s.b.a.audit.listener.AuditListener - AuditEvent [timestamp=Wed Apr 08 11:13:47 UTC 2015, principal=ads, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@ffffe21a: RemoteIpAddress: 10.10.100.207; SessionId: null}]
  11:13:48.324 [qtp1131266554-19] INFO  o.s.boot.SpringApplication - Starting application on api01.prd.rbx.xxxx.com with PID 24204 (started by ads in /home/ads/config-server)
  11:13:48.328 [qtp1131266554-19] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@473cffd3: startup date [Wed Apr 08 11:13:48 UTC 2015]; root of context hierarchy
  11:13:48.332 [qtp1131266554-19] INFO  o.s.boot.SpringApplication - Started application in 0.092 seconds (JVM running for 246.887)
  11:13:48.332 [qtp1131266554-19] INFO  o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@473cffd3: startup date [Wed Apr 08 11:13:48 UTC 2015]; root of context hierarchy
  11:13:48.612 [qtp1131266554-55] INFO  o.s.b.a.audit.listener.AuditListener - AuditEvent [timestamp=Wed Apr 08 11:13:48 UTC 2015, principal=ads, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@ffffe21a: RemoteIpAddress: 10.10.100.207; SessionId: null}]
  11:13:50.601 [qtp1131266554-77] INFO  o.s.boot.SpringApplication - Starting application on api01.prd.rbx.xxxx.com with PID 24204 (started by ads in /home/ads/config-server)
  11:13:50.604 [qtp1131266554-77] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@44330486: startup date [Wed Apr 08 11:13:50 UTC 2015]; root of context hierarchy
  11:13:50.607 [qtp1131266554-77] INFO  o.s.boot.SpringApplication - Started application in 0.088 seconds (JVM running for 249.162)
  11:13:50.607 [qtp1131266554-77] INFO  o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@44330486: startup date [Wed Apr 08 11:13:50 UTC 2015]; root of context hierarchy
  11:13:51.831 [qtp1131266554-55] INFO  o.s.boot.SpringApplication - Starting application on api01.prd.rbx.xxxx.com with PID 24204 (started by ads in /home/ads/config-server)
  11:13:51.834 [qtp1131266554-55] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1843040d: startup date [Wed Apr 08 11:13:51 UTC 2015]; root of context hierarchy
  11:13:51.840 [qtp1131266554-55] INFO  o.s.boot.SpringApplication - Started application in 0.094 seconds (JVM running for 250.395)
  </code></pre>
  
  <p>Any idea, how to solve the problem?</p>
  
  <p>best,
  fritz</p>