title: Spring Boot Application Shutting Down as soon as it's started
body: <p>I used Spring Initializr to initialize a new project. I further added MySQL Driver, Spring Data JPA, Spring Boot Actuator, and Spring Web as project dependencies. Exporting the .zip file, the only thing I did is, changed the <em>application.properties</em> file. When I run the application, it starts and stops immediately. Here's the response:</p>
  <pre class="lang-sh prettyprint-override"><code>2020-10-29 14:46:52.414  INFO 150728 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
  2020-10-29 14:46:58.679  INFO 150728 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
  2020-10-29 14:46:58.705  INFO 150728 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
  2020-10-29 14:46:58.832 DEBUG 150728 --- [           main] o.h.type.spi.TypeConfiguration$Scope     : Scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration@2b6a0ea9] to MetadataBuildingContext [org.hibernate.boot.internal.MetadataBuildingContextRootImpl@4dde8976]
  2020-10-29 14:46:59.028 DEBUG 150728 --- [           main] o.h.type.spi.TypeConfiguration$Scope     : Scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration@2b6a0ea9] to SessionFactoryImpl [org.hibernate.internal.SessionFactoryImpl@74b86971]
  2020-10-29 14:47:17.727  INFO 150728 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
  2020-10-29 14:47:17.737 TRACE 150728 --- [           main] o.h.type.spi.TypeConfiguration$Scope     : Handling #sessionFactoryCreated from [org.hibernate.internal.SessionFactoryImpl@74b86971] for TypeConfiguration
  2020-10-29 14:47:17.739  INFO 150728 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
  2020-10-29 14:47:17.892  INFO 150728 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 28.826 seconds (JVM running for 29.63)
  2020-10-29 14:47:17.905  INFO 150728 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
  2020-10-29 14:47:17.905 TRACE 150728 --- [extShutdownHook] o.h.type.spi.TypeConfiguration$Scope     : Handling #sessionFactoryClosed from [org.hibernate.internal.SessionFactoryImpl@74b86971] for TypeConfiguration
  2020-10-29 14:47:17.906 DEBUG 150728 --- [extShutdownHook] o.h.type.spi.TypeConfiguration$Scope     : Un-scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration$Scope@ae36ddd] from SessionFactory [org.hibernate.internal.SessionFactoryImpl@74b86971]
  2020-10-29 14:47:17.910  INFO 150728 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
  2020-10-29 14:47:18.760  INFO 150728 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
  </code></pre>
  <p>and my <em>application.properties</em> file:</p>
  <pre class="lang-sh prettyprint-override"><code>server.contextPath=/
  server.port=4000
  
  #data-source configurations
  spring.datasource.url=jdbc:mysql://host:3306/schema?useJDBCCompliantTimezoneShift=true&amp;useLegacyDatetimeCode=false&amp;serverTimezone=UTC
  spring.datasource.username=username
  spring.datasource.password=password
  spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
  
  spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect
  
  # DDL generation
  spring.jpa.generate-ddl=true
  spring.jpa.hibernate.ddl-auto=update
  
  spring.jpa.open-in-view=false
  
  #Turn Statistics on
  spring.jpa.properties.hibernate.generate_statistics=true
  logging.level.org.hibernate.stat=debug
  # Show all queries
  spring.jpa.show-sql=true
  
  spring.data.jpa.repositories.bootstrap-mode=default
  spring.jpa.properties.hibernate.format_sql=true
  logging.level.org.hibernate.type=trace
  </code></pre>
  <p>My <em>pom.xml</em> file is as follows:</p>
  <pre class="lang-xml prettyprint-override"><code>    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-milestones&lt;/id&gt;
              &lt;name&gt;Spring Milestones&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/milestone&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-snapshots&lt;/id&gt;
              &lt;name&gt;Spring Snapshots&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/snapshot&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-milestones&lt;/id&gt;
              &lt;name&gt;Spring Milestones&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/milestone&lt;/url&gt;
          &lt;/pluginRepository&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-snapshots&lt;/id&gt;
              &lt;name&gt;Spring Snapshots&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/snapshot&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  </code></pre>