spring-boot:run启动失败
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ycpd-vouchersystem-server 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.0.3.RELEASE:run (default-cli) > test-compile @ ycpd-vouchersystem-server >>>
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ ycpd-vouchersystem-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.2:compile (default-compile) @ ycpd-vouchersystem-server ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ ycpd-vouchersystem-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\sxy\YCPD_JAVA\trunk\ycpd-parent\ycpd-vouchersystem\ycpd-vouchersystem-server\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.2:testCompile (default-testCompile) @ ycpd-vouchersystem-server ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.0.3.RELEASE:run (default-cli) < test-compile @ ycpd-vouchersystem-server <<<
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.3.RELEASE:run (default-cli) @ ycpd-vouchersystem-server ---
20:37:51.754 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
20:37:51.764 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
20:37:51.764 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.resolver.JPATraversableResolver as ValidatorFactory-scoped traversable resolver.
20:37:51.764 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
20:37:51.764 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
20:37:51.764 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: org.springframework.util.Assert.isTrue(ZLjava/util/function/Supplier;)V
at org.springframework.boot.context.properties.source.ConfigurationPropertyName.lambda$append$2(ConfigurationPropertyName.java:185)
at org.springframework.boot.context.properties.source.ConfigurationPropertyName.processElement(ConfigurationPropertyName.java:548)
at org.springframework.boot.context.properties.source.ConfigurationPropertyName.process(ConfigurationPropertyName.java:524)
at org.springframework.boot.context.properties.source.ConfigurationPropertyName.append(ConfigurationPropertyName.java:185)
at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:112)
at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:89)
at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:71)
at org.springframework.boot.context.properties.bind.ArrayBinder.bindAggregate(ArrayBinder.java:46)
at org.springframework.boot.context.properties.bind.AggregateBinder.bind(AggregateBinder.java:58)
at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$2(Binder.java:305)
at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:441)
at org.springframework.boot.context.properties.bind.Binder$Context.access$100(Binder.java:381)
at org.springframework.boot.context.properties.bind.Binder.bindAggregate(Binder.java:304)
at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:262)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:221)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:210)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:166)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$asDocuments$10(ConfigFileApplicationListener.java:572)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.asDocuments(ConfigFileApplicationListener.java:576)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadDocuments(ConfigFileApplicationListener.java:557)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:518)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:497)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:465)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$6(ConfigFileApplicationListener.java:447)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$7(ConfigFileApplicationListener.java:446)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:443)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:335)
at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:214)
at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:197)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:184)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:170)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:358)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:317)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
at org.ycpd.vouchersystem.server.VoucherSystemApplication.main(VoucherSystemApplication.java:10)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.587 s
[INFO] Finished at: 2018-08-26T20:37:52+08:00
[INFO] Final Memory: 34M/276M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.3.RELEASE:run (default-cli) on project ycpd-vouchersystem-server: An exception occurred while running. null: InvocationTargetException: org.springframework.util.Assert.isTrue(ZLjava/util/function/Supplier;)V -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
问题原因:版本兼容问题,我的springboot2.0.3,而spring用的还是4.3.13
Spring boot 版本 | Spring Framework | jdk 版本 | maven 版本 |
---|---|---|---|
1.2.0 版本之前 | 6 | 3.0 | |
1.2.0 | 4.1.3+ | 6 | 3.2+ |
1.2.1 | 4.1.3+ | 7 | 3.2+ |
1.2.3 | 4.1.5+ | 7 | 3.2+ |
1.3.4 | 4.2.6+ | 7 | 3.2+ |
1.3.6 | 4.2.7+ | 7 | 3.2+ |
1.3.7 | 4.2.7+ | 7 | 3.2+ |
1.3.8 | 4.2.8+ | 7 | 3.2+ |
1.4.0 | 4.3.2+ | 7 | 3.2+ |
1.4.1 | 4.3.3 | 7 | 3.2+ |
1.4.2 | 4.3.4 | 7 | 3.2+ |
1.4.3 | 4.3.5 | 7 | 3.2+ |
1.4.4 | 4.3.6 | 7 | 3.2+ |
1.4.5 | 4.3.7 | 7 | 3.2+ |
1.4.6 | 4.3.8 | 7 | 3.2+ |
1.4.7 | 4.3.9 | 7 | 3.2+ |
1.5.0 | 4.3.6 | 7 | 3.2+ |
1.5.2 | 4.3.7 | 7 | 3.2+ |
1.5.3 | 4.3.8 | 7 | 3.2+ |
1.5.4 | 4.3.9 | 7 | 3.2+ |
1.5.5 | 4.3.10 | 7 | 3.2+ |
1.5.7 | 4.3.11 | 7 | 3.2+ |
1.5.8 | 4.3.12 | 7 | 3.2+ |
1.5.9 | 4.3.13 | 7 | 3.2+ |
2.0.0 | 5.0.2 | 8 | 3.2+ |