les erreurs sont:
/usr/lib/jvm/Java-8-Oracle/bin/Java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:40745,suspend=y,server=n -Dspring.output.ansi.enabled=always -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/Java-8-Oracle/jre/lib/charsets.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/deploy.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/javaws.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/jce.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/jfr.jar:/usr/lib/jvm/Java-8-Oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/Java-8-Oracle/jr main] o.s.b.c.c.ConfigFileApplicationListener : Skipped (empty) config file 'file:./application.properties' for profile default
2016-03-25 23:43:41.426 DEBUG 18169 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped (empty) config file 'classpath:/application.properties' for profile default
2016-03-25 23:43:41.460 INFO 18169 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3738449f: startup date [Fri Mar 25 23:43:41 EET 2016]; root of context hierarchy
2016-03-25 23:43:44.256 DEBUG 18169 --- [ main] o.s.b.a.AutoConfigurationPackages : @EnableAutoConfiguration was declared on a class in the package 'org.infoowl'. Automatic @Repository and @Entity scanning is enabled.
2016-03-25 23:43:46.084 INFO 18169 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2016-03-25 23:43:46.136 INFO 18169 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2016-03-25 23:43:46.306 INFO 18169 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {4.3.11.Final}
2016-03-25 23:43:46.309 INFO 18169 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2016-03-25 23:43:46.323 INFO 18169 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2016-03-25 23:43:47.042 INFO 18169 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2016-03-25 23:43:47.841 INFO 18169 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
2016-03-25 23:43:48.085 INFO 18169 --- [ main] o.h.h.i.ast.ASTQueryTranslatorFactory : HHH000397: Using ASTQueryTranslatorFactory
2016-03-25 23:43:48.971 INFO 18169 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000228: Running hbm2ddl schema update
2016-03-25 23:43:48.972 INFO 18169 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000102: Fetching database metadata
2016-03-25 23:43:48.988 INFO 18169 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000396: Updating schema
2016-03-25 23:43:49.111 INFO 18169 --- [ main] o.hibernate.tool.hbm2ddl.TableMetadata : HHH000261: Table found: movies.movie
2016-03-25 23:43:49.112 INFO 18169 --- [ main] o.hibernate.tool.hbm2ddl.TableMetadata : HHH000037: Columns: [actor, id, title]
2016-03-25 23:43:49.112 INFO 18169 --- [ main] o.hibernate.tool.hbm2ddl.TableMetadata : HHH000108: Foreign keys: []
2016-03-25 23:43:49.112 INFO 18169 --- [ main] o.hibernate.tool.hbm2ddl.TableMetadata : HHH000126: Indexes: [primary]
2016-03-25 23:43:49.113 INFO 18169 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000232: Schema update complete
2016-03-25 23:43:50.698 INFO 18169 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-03-25 23:43:50.727 DEBUG 18169 --- [ main] utoConfigurationReportLoggingInitializer :
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
HazelcastJpaDependencyAutoConfiguration did not match
- required @ConditionalOnClass classes not found: com.hazelcast.core.HazelcastInstance (OnClassCondition)
HornetQAutoConfiguration did not match
- required @ConditionalOnClass classes not found: javax.jms.ConnectionFactory,org.hornetq.api.jms.HornetQJMSClient (OnClassCondition)
HttpEncodingAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.web.filter.CharacterEncodingFilter (OnClassCondition)
HypermediaAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.hateoas.Resource,org.springframework.plugin.core.Plugin (OnClassCondition)
InfinispanCacheConfiguration did not match
- required @ConditionalOnClass classes not found: org.infinispan.spring.provider.SpringEmbeddedCacheManager (OnClassCondition)
IntegrationAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.integration.config.EnableIntegration (OnClassCondition)
JCacheCacheConfiguration did not match
- required @ConditionalOnClass classes not found: javax.cache.Caching,org.springframework.cache.jcache.JCacheCacheManager (OnClassCondition)
JacksonAutoConfiguration.JodaDateTimeJacksonConfiguration did not match
- required @ConditionalOnClass classes not found: org.joda.time.DateTime,com.fasterxml.jackson.datatype.joda.ser.DateTimeSerializer,com.fasterxml.jackson.datatype.joda.cfg.JacksonJodaDateFormat (OnClassCondition)
JacksonAutoConfiguration.ParameterNamesModuleConfiguration did not match
- required @ConditionalOnClass classes not found: com.fasterxml.jackson.module.paramnames.ParameterNamesModule (OnClassCondition)
JacksonHttpMessageConvertersConfiguration.MappingJackson2XmlHttpMessageConverterConfiguration did not match
- required @ConditionalOnClass classes not found: com.fasterxml.jackson.dataformat.xml.XmlMapper (OnClassCondition)
JerseyAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.glassfish.jersey.server.spring.SpringComponentProvider,javax.servlet.ServletRegistration (OnClassCondition)
JmsAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.jms.core.JmsTemplate (OnClassCondition)
JndiConnectionFactoryAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.jms.core.JmsTemplate (OnClassCondition)
JndiDataSourceAutoConfiguration did not match
- @ConditionalOnClass classes found: javax.sql.DataSource,org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType (OnClassCondition)
- @ConditionalOnProperty missing required properties spring.datasource.jndi-name (OnPropertyCondition)
JndiJtaConfiguration did not match
- @ConditionalOnClass classes found: org.springframework.transaction.jta.JtaTransactionManager (OnClassCondition)
- JNDI environment is not available (OnJndiCondition)
JooqAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.jooq.DSLContext (OnClassCondition)
JpaBaseConfiguration.JpaWebConfiguration did not match
- @ConditionalOnClass classes found: org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter (OnClassCondition)
- not a web application (OnWebApplicationCondition)
LinkedInAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.social.config.annotation.SocialConfigurerAdapter,org.springframework.social.linkedin.connect.LinkedInConnectionFactory (OnClassCondition)
LiquibaseAutoConfiguration did not match
- required @ConditionalOnClass classes not found: liquibase.integration.spring.SpringLiquibase (OnClassCondition)
MailSenderAutoConfiguration did not match
- required @ConditionalOnClass classes not found: javax.mail.internet.MimeMessage (OnClassCondition)
MailSenderValidatorAutoConfiguration did not match
- @ConditionalOnProperty missing required properties spring.mail.test-connection (OnPropertyCondition)
MessageSourceAutoConfiguration did not match
- No bundle found for spring.messages.basename: messages (MessageSourceAutoConfiguration.ResourceBundleCondition)
MongoAutoConfiguration did not match
- required @ConditionalOnClass classes not found: com.mongodb.MongoClient (OnClassCondition)
MongoDataAutoConfiguration did not match
- required @ConditionalOnClass classes not found: com.mongodb.Mongo,org.springframework.data.mongodb.core.MongoTemplate (OnClassCondition)
MongoRepositoriesAutoConfiguration did not match
- required @ConditionalOnClass classes not found: com.mongodb.Mongo,org.springframework.data.mongodb.repository.MongoRepository (OnClassCondition)
MultipartAutoConfiguration did not match
- required @ConditionalOnClass classes not found: javax.servlet.Servlet,javax.servlet.MultipartConfigElement (OnClassCondition)
MustacheAutoConfiguration did not match
- required @ConditionalOnClass classes not found: com.samskivert.mustache.Mustache (OnClassCondition)
OAuth2AutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.security.oauth2.common.OAuth2AccessToken (OnClassCondition)
RabbitAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.amqp.rabbit.core.RabbitTemplate,com.rabbitmq.client.Channel (OnClassCondition)
ReactorAutoConfiguration did not match
- required @ConditionalOnClass classes not found: reactor.spring.context.config.EnableReactor,reactor.Environment (OnClassCondition)
RedisAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.data.redis.connection.jedis.JedisConnection,org.springframework.data.redis.core.RedisOperations,redis.clients.jedis.Jedis (OnClassCondition)
RepositoryRestMvcAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration (OnClassCondition)
SecurityAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.security.authentication.AuthenticationManager,org.springframework.security.config.annotation.authentication.configurers.GlobalAuthenticationConfigurerAdapter (OnClassCondition)
SecurityFilterAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer,org.springframework.security.config.http.SessionCreationPolicy (OnClassCondition)
SendGridAutoConfiguration did not match
- required @ConditionalOnClass classes not found: com.sendgrid.SendGrid (OnClassCondition)
ServerPropertiesAutoConfiguration did not match
- not a web application (OnWebApplicationCondition)
SessionAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.session.Session (OnClassCondition)
SitePreferenceAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.mobile.device.site.SitePreferenceHandlerInterceptor,org.springframework.mobile.device.site.SitePreferenceHandlerMethodArgumentResolver (OnClassCondition)
SocialWebAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.social.connect.web.ConnectController,org.springframework.social.config.annotation.SocialConfigurerAdapter (OnClassCondition)
SolrAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.Apache.solr.client.solrj.impl.HttpSolrServer,org.Apache.solr.client.solrj.impl.CloudSolrServer,org.Apache.solr.common.cloud.HashPartitioner (OnClassCondition)
SolrRepositoriesAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.Apache.solr.client.solrj.SolrServer,org.springframework.data.solr.repository.SolrRepository (OnClassCondition)
SpringApplicationAdminJmxAutoConfiguration did not match
- @ConditionalOnProperty missing required properties spring.application.admin.enabled (OnPropertyCondition)
SpringDataWebAutoConfiguration did not match
- @ConditionalOnClass classes found: org.springframework.data.web.PageableHandlerMethodArgumentResolver,org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter (OnClassCondition)
- not a web application (OnWebApplicationCondition)
ThymeleafAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.thymeleaf.spring4.SpringTemplateEngine (OnClassCondition)
TwitterAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.social.config.annotation.SocialConfigurerAdapter,org.springframework.social.Twitter.connect.TwitterConnectionFactory (OnClassCondition)
VelocityAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.Apache.velocity.app.VelocityEngine,org.springframework.ui.velocity.VelocityEngineFactory (OnClassCondition)
WebMvcAutoConfiguration did not match
- required @ConditionalOnClass classes not found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet (OnClassCondition)
WebSocketAutoConfiguration did not match
- required @ConditionalOnClass classes not found: javax.servlet.Servlet,javax.websocket.server.ServerContainer (OnClassCondition)
WebSocketMessagingAutoConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer (OnClassCondition)
XADataSourceAutoConfiguration did not match
- @ConditionalOnClass classes found: javax.sql.DataSource,javax.transaction.TransactionManager,org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType (OnClassCondition)
- @ConditionalOnBean (types: org.springframework.boot.jta.XADataSourceWrapper; SearchStrategy: all) found no beans (OnBeanCondition)
Exclusions:
-----------
None
Unconditional classes:
----------------------
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration
2016-03-25 23:43:50.761 INFO 18169 --- [ main] o.i.InternetMovieDatabaseApplication : Started InternetMovieDatabaseApplication in 11.476 seconds (JVM running for 14.426)
2016-03-25 23:43:50.774 INFO 18169 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@3738449f: startup date [Fri Mar 25 23:43:41 EET 2016]; root of context hierarchy
2016-03-25 23:43:50.789 INFO 18169 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2016-03-25 23:43:50.790 INFO 18169 --- [ Thread-2] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
Disconnected from the target VM, address: '127.0.0.1:40745', transport: 'socket'
Process finished with exit code 0
J'essaye de commencer mais après ces sorties, ça s'arrête. J'ai utilisé printemps initializr. Je veux juste faire une petite API REST.
C'est mon pom.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.Apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.Apache.org/POM/4.0.0 http://maven.Apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.infoowl</groupId>
<artifactId>internetmoviedatabase</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>InternetMovieDatabase</name>
<description>Internet Movie Database Application</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<Java.version>1.8</Java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-Java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-Tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
c'est application.properteis
:
spring.datasource.url=jdbc:mysql://localhost:3306/movies
spring.datasource.username=root
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=update
server.port=8181
spring.jpa.database=MYSQL
spring.jpa.show-sql=true
InternetMovieDatabaseApplication
class:
package org.infoowl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class InternetMovieDatabaseApplication {
public static void main(String[] args) {
SpringApplication.run(InternetMovieDatabaseApplication.class, args);
}
}
ServletInitializer
class:
package org.infoowl;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(InternetMovieDatabaseApplication.class);
}
}
Ce sont les erreurs si je supprime ServletInitializer
:
2016-03-26 00:20:22.691 ERROR 20251 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.infoowl.InternetMovieDatabaseApplication]; nested exception is Java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.context.web.SpringBootServletInitializer
at org.springframework.context.annotation.ConfigurationClassParser.parse(Configurplication.Java:1191) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at o
Caused by: Java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.context.web.SpringBootServletInitializer
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.Java:163) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.Java:292) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.Java:232) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at E.jar:4.2.5.RELEASE]
... 12 common frames omitted
Caused by: Java.lang.NoClassDefFoundError: javax/servlet/ServletContext
at Java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_74]
at Java.lang.Class.privateGetDeclaredMethods(Class.Java:2701) ~[na:1.8.0_74]
at Java.lang.Class.getDeclaredMethods(Class.Java:1975) ~[na:1.8.0_74]
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.Java:152) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE]
... 16 common frames omitted
Caused by: Java.lang.ClassNotFoundException: javax.servlet.ServletContext
at Java.net.URLClassLoader.findClass(URLClassLoader.Java:381) ~[na:1.IU-144.4199.23/lib/idea_rt.jar]
Disconnected from the target VM, address: '127.0.0.1:42011', transport: 'socket'
Process finished with exit code 1
Je ne vois rien de vraiment flagrant avec ce que vous avez. J'ai une application que je déploie simultanément en tant que jarre et guerre dans différents environnements (ils ne diffèrent que par leur emballage); J'ai un ServletInitializer
équivalent au vôtre et cela fonctionne sans problème avec une différence principale.
J'utilise une configuration d'exécution maven avec spring-boot:run
comme valeur "Ligne de commande". Avec cela, je ne peux rien faire de plus que de changer le pom pour refléter le jarre ou la guerre, courir et partir. J'ai rencontré des problèmes lors du basculement et de l'utilisation d'une configuration qui appelle main
dans la classe d'application. Par exemple, juste pour le plaisir, je viens de lancer une instance de l'application avec jar packaging et main
. Ne serait même pas lancer. Ceci est juste après l'avoir emballé et lancé en utilisant la configuration Maven que j'ai mentionnée ci-dessus.
Je recommanderais de commencer par créer cette configuration d'exécution maven et voir quels sont les résultats. Voici comment procéder dans Intellij afin que vous n'ayez pas à utiliser l'interface de ligne de commande.
+
vert dans le coin supérieur gauche.spring-boot:run
à l'entrée "Ligne de commande".Je ne suis pas un utilisateur d'Eclipse/sts mais je suis sûr qu'il existe une manière similaire de le faire.
Apparemment, vous allez empaqueter votre application en tant que war
, c'est correct, mais le problème est que vous l'exécutez via la méthode main
dans la classe InternetMovieDatabaseApplication
. Au lieu de cela, vous devez déployer votre application sur un Standalone Servlet Container , comme Tomcat ou Jetty , ou exécuter l'application à l'aide de la commande mvn spring-boot:run
.
Si empaqueter votre application sous la forme d'une archive war
n'est pas une exigence stricte, je vous recommande de make jar, pas war . Pour ce faire, commencez par supprimer la packaging
de votre pom.xml
:
<packaging>war</packaging>
Puis supprimez la dépendance spring-boot-starter-Tomcat
:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-Tomcat</artifactId>
<scope>provided</scope>
</dependency>
Enfin, supprimez la classe ServletInitializer
et exécutez la méthode main
dans votre classe InternetMovieDatabaseApplication
.
Je ne pense pas que vous ayez besoin de votre ServletInitializer
votre InternetMovieDatabaseApplication
avec l'annotation @SpringBootApplication
devrait suffire.