[英]Error when started Spring-boot, I think it's some missing dependency
> INFO 9346 --- [ main] bccheckin.checkin.CheckinApplication > INFO 9346 --- [main] bccheckin.checkin.CheckinApplication
: Starting CheckinApplication v0.0.1-SNAPSHOT on MacBook-Air-de-Thomaz.local with PID 9346 (/Users/thomaz/Documents/Unitri/6Periodo/GestaoDaInovacao/checkin-api/target/checkin-0.0.1-SNAPSHOT.jar started by thomaz in /Users/thomaz/Documents/Unitri/6Periodo/GestaoDaInovacao/checkin-api) 2017-09-02 15:02:57.996 INFO 9346 --- [ main] bccheckin.checkin.CheckinApplication : No active profile set, falling back to default profiles: default 2017-09-02 15:02:58.146 INFO 9346 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@41906a77: startup date [Sat Sep 02 15:02:58 BRT 2017];
:使用PID 9346在MacBook-Air-de-Thomaz.local上启动CheckinApplication v0.0.1-SNAPSHOT(/Users/thomaz/Documents/Unitri/6Periodo/GestaoDaInovacao/checkin-api/target/checkin-0.0.1-SNAPSHOT.jar由thomaz在/ Users / thomaz / Documents / Unitri / 6Periodo / GestaoDaInovacao / checkin-api)中启动)2017-09-02 15:02:57.996 INFO 9346 --- [main] bccheckin.checkin.CheckinApplication:未设置活动配置文件回复到默认配置文件:默认2017-09-02 15:02:58.146信息9346 --- [main] ationConfigEmbeddedWebApplicationContext:刷新org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@41906a77:启动日期[Sat Sep 02 15: 2017年BRT 02:58]; root of context hierarchy 2017-09-02 15:02:58.284 INFO 9346 --- [pool-1-thread-1] org.hibernate.validator.util.Version : Hibernate Validator 4.1.0.Final 2017-09-02 15:02:58.299 INFO 9346 --- [pool-1-thread-1] ohverDefaultTraversableResolver : Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
上下文层次结构的根2017-09-02 15:02:58.284信息9346-[pool-1-thread-1] org.hibernate.validator.util.Version:Hibernate Validator 4.1.0.Final 2017-09-02 15:02:58.299信息9346-[pool-1-thread-1] ohverDefaultTraversableResolver:实例化了org.hibernate.validator.engine.resolver.JPATraversableResolver的实例。 2017-09-02 15:02:59.748 WARN 9346 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [br.com.checkin.checkin.CheckinApplication];
2017-09-02 15:02:59.748 WARN 9346 --- [main] ationConfigEmbeddedWebApplicationContext:上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanDefinitionStoreException:无法处理配置类的导入候选[br .com.checkin.checkin.CheckinApplication]; nested exception is java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletConfiguration due to org/springframework/boot/context/embedded/ServletRegistrationBean not found.
嵌套异常是java.lang.IllegalStateException:由于找不到org / springframework / boot / context / embedded / ServletRegistrationBean,因此无法评估org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration $ DispatcherServletConfiguration上的条件。 Make sure your own configuration does not rely on that class.
确保您自己的配置不依赖该类。 This can also happen if you are @ComponentScanning a springframework package (eg if you put a @ComponentScan in the default package by mistake) 2017-09-02 15:02:59.755 INFO 9346 --- [ main] utoConfigurationReportLoggingInitializer :
如果您是@ComponentScanning springframework软件包(例如,如果您错误地将@ComponentScan放入默认软件包),也会发生这种情况2017-09-02 15:02:59.755 INFO 9346 --- [main] utoConfigurationReportLoggingInitializer:
Error starting ApplicationContext.
启动ApplicationContext时出错。 To display the auto-configuration report enable debug logging (start with --debug)
要显示自动配置报告,请启用调试日志记录(以--debug开头)
2017-09-02 15:02:59.772 ERROR 9346 --- [ main] osboot.SpringApplication : Application startup failed
2017-09-02 15:02:59.772错误9346 --- [main] osboot.SpringApplication:应用程序启动失败
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [br.com.checkin.checkin.CheckinApplication];
org.springframework.beans.factory.BeanDefinitionStoreException:无法处理配置类[br.com.checkin.checkin.CheckinApplication]的导入候选对象; nested exception is java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletConfiguration due to org/springframework/boot/context/embedded/ServletRegistrationBean not found.
嵌套异常是java.lang.IllegalStateException:由于找不到org / springframework / boot / context / embedded / ServletRegistrationBean,因此无法评估org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration $ DispatcherServletConfiguration上的条件。 Make sure your own configuration does not rely on that class.
确保您自己的配置不依赖该类。 This can also happen if you are @ComponentScanning a springframework package (eg if you put a @ComponentScan in the default package by mistake) at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:616) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:548) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:185) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcess
如果您正在org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:616)上使用@ComponentScanning springframework软件包(例如,如果错误地将@ComponentScan放入默认软件包),也会发生这种情况。 context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE],位于org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:548)〜[spring-context-4.3.10.RELEASE.jar !/:4.3.10.RELEASE],位于org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:185)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]在org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]在org.springframework.context.annotation处。 ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcess or.java:228) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:270) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.
or.java:228)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE],位于org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:270)〜[spring -context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE],位于org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93)〜[spring-context-4.3.10.RELEASE。 jar!/:4.3.10.RELEASE]在org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE ]在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]在org.springframework.boot.context .embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)〜[spring-boot-1.5.6.RELEASE.jar!/:1.5.6。 RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE] at br.com.checkin.checkin.CheckinApplication.main(CheckinApplication.java:11) [classes!/:0.0.1-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
RELEASE]在org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:693)[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]在org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:360)[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]在org.springframework.boot.SpringApplication.run(SpringApplication.java:303)[spring-boot- 1.5.6.RELEASE.jar!/:1.5.6.RELEASE]位于org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)[spring-boot-1.5.6.RELEASE.jar!/:1.5。 [RELEASE]位于org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]位于br.com.checkin.checkin .checkinApplication.main(CheckinApplication.java:11)在sun.reflect.NativeMethodAccessorImpl.invoke上的[classes!/:0.0.1-SNAPSHOT] 0(本机方法)在sun.reflect.NativeMethodAccessorImpl.invoke上的[na:1.8.0_111] (NativeMethodAccessorImpl.java:62)〜[na:1.8.0_111]在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43) ~[na:1.8.0_111] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] Caused by: java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletConfiguration due to org/springframework/boot/context/embedded/ServletRegistrationBean not found.
thodAccessorImpl.java:43)〜[na:1.8.0_111]在java.lang.reflect.Method.invoke(Method.java:498)〜[na:1.8.0_111]在org.springframework.boot.loader.MainMethodRunner处。在org.springframework.boot.loader.Launcher.launch(Launcher.java:87)处运行(MainMethodRunner.java:48)[checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] [checkin-0.0.1 -org.springframework.boot.loader.Launcher.launch(-Launcher.java:50)处的-SNAPSHOT.jar:0.0.1-SNAPSHOT](组织处的checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]。 springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)[checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]原因:java.lang.IllegalStateException:无法评估org.springframework上的条件.boot.autoconfigure.web.DispatcherServletAutoConfiguration $ DispatcherServletConfiguration由于未找到org / springframework / boot / context / embedded / ServletRegistrationBean。 Make sure your own configuration does not rely on that class.
确保您自己的配置不依赖该类。 This can also happen if you are @ComponentScanning a springframework package (eg if you put a @ComponentScan in the default package by mistake) at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:55) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:217) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:349) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:264) ~[spring-context-4.3.10.RELEASE.jar!/:4.
如果您正在org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:55)上使用@ComponentScanning springframework软件包(例如,如果错误地将@ComponentScan放入默认软件包),也会发生这种情况。 spring-boot-autoconfigure-1.3.1.RELEASE.jar!/:1.3.1.RELEASE]在org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)〜[spring-context-4.3.10 .RELEASE.jar!/:4.3.10.RELEASE],位于org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:217)〜[spring-context-4.3.10.RELEASE.jar!/:4.3。 10.RELEASE],位于org.springframework的org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:349)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]。 context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:264)〜[spring-context-4.3.10.RELEASE.jar!/:4。 3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:606) ~[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] ... 23 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/ServletRegistrationBean at org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DefaultDispatcherServletCondition.checkServletRegistrations(DispatcherServletAutoConfiguration.java:166) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DefaultDispatcherServletCondition.getMatchOutcome(DispatcherServletAutoConfiguration.java:135) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at org.
3.10.RELEASE],位于org.springframework.org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]。 context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:606)〜[spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] ...省略了23个常见框架,原因是:java.lang。 NoClassDefFoundError:org / springframework / boot / context / embedded / ServletRegistrationBean位于org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration $ DefaultDispatcherServletCondition.checkServletRegistrations(DispatcherServletAutoConfiguration.java:166)〜[spring-boot-autoconfigure-1.3.1.RELEASE。 jar!/:1.3.1.RELEASE],位于org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration $ DefaultDispatcherServletCondition.getMatchOutcome(DispatcherServletAutoConfiguration.java:135)〜[spring-boot-autoconfigure-1.3.1.RELEASE.jar!/ :1.3.1.RELEASE]。 springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] ... 29 common frames omitted Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.embedded.ServletRegistrationBean at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_111] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_111] at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) ~[checkin-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_111] ... 32 common frames omitted
springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)〜[spring-boot-autoconfigure-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] ...省略了29个常见框架创建人:java.lang.ClassNotFoundException:org.springframework.boot.context.embedded.ServletRegistrationBean在java.net.URLClassLoader.findClass(URLClassLoader.java:381)〜[na:1.8.0_111]在java.lang.ClassLoader.loadClass (ClassLoader.java:424)〜[na:1.8.0_111]在org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)〜[checkin-0.0.1-SNAPSHOT.jar:0.0.1- SNAPSHOT],位于java.lang.ClassLoader.loadClass(ClassLoader.java:357)〜[na:1.8.0_111] ...省略了32个共同的框架
pom.xml 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>br.com.checkin</groupId>
<artifactId>checkin</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>checkin</name>
<description>checkin project for college's event.</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<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-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.1.0.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.10.RELEASE</version>
</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>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>1.3.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.4.0.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I do not know what to do. 我不知道该怎么办。 Thanks for answer me.
谢谢你回答我。 I'm sorry for English, I'm from Brazil.
我很抱歉英语,我来自巴西。
Seems that you are mixing different versions of spring-boot libraries and also Spring: 似乎您正在混合使用不同版本的spring-boot库和Spring:
mvn dependency:tree
to make sure all the versions of Spring and Spring Boot libraries are consistent mvn dependency:tree
以确保所有版本的Spring和Spring Boot库是一致的 You can check out like this, for example, this is my pom.xml hope that might help you out 您可以像这样签出,例如,这是我的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>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.booksotre</groupId>
<artifactId>bookstore</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Bookstore</name>
<description>frontend part</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</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-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.14</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.