代码拉取完成,页面将自动刷新
了解一下 HierarchicalBeanFactory,spring applicationcontext可以分层级的,可以把框架的applicationcontext跟应用的applicationcontext 隔开
see blog with url https://www.cnblogs.com/rongdi/p/11780204.html in cnblogs
run the demo code cause an error flow
2019-11-04 23:59:45.705 INFO 6252 --- [ main] c.f.applicationcontext_test.App : No active profile set, falling back to default profiles: default
2019-11-04 23:59:46.478 WARN 6252 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.env.Environment' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2019-11-04 23:59:46.487 INFO 6252 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-11-04 23:59:46.619 ERROR 6252 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method methodValidationPostProcessor in org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration required a bean of type 'org.springframework.core.env.Environment' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.core.env.Environment' in your configuration.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。