解决方法:
在pom.xml中加入或者父pom.xml中加入
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
即可
报错信息:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.6.RELEASE)
2019-07-03 14:17:49.002 INFO 67531 --- [ main] c.z.e.EurekaClientApplication : No active profile set, falling back to default profiles: default
2019-07-03 14:17:49.438 INFO 67531 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=7ee7d973-fec7-384c-baa1-c7a4b4852bc5
2019-07-03 14:17:49.475 INFO 67531 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$131bb016] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-prox