Java 什么';Spring云配置的大小限制是什么?
我们正在使用Spring引导、Spring云配置,并从外部源生成application.yaml。这个yaml文件大约有53k行配置,文件大小为2.7mb。不幸的是,当连接到此配置时,spring应用程序无法启动 我设法在本地将yaml文件提供给SpringCloudConfig服务器,并通过url请求表示,如 < >但是,当我通过<代码> MVN干净的Spring启动启动我的Spring启动应用程序:Run-DprSungBoo.Run.Prrices =本地< /代码>它在引导过程的中间停止。 事实上,它在从云配置服务器获取yaml后停止。如您所见,初始化过滤器“apiKeyHeaderFilter”大约需要2分钟。但在那之后它就停止了Java 什么';Spring云配置的大小限制是什么?,java,spring-boot,spring-cloud-config,spring-config,Java,Spring Boot,Spring Cloud Config,Spring Config,我们正在使用Spring引导、Spring云配置,并从外部源生成application.yaml。这个yaml文件大约有53k行配置,文件大小为2.7mb。不幸的是,当连接到此配置时,spring应用程序无法启动 我设法在本地将yaml文件提供给SpringCloudConfig服务器,并通过url请求表示,如 < >但是,当我通过 MVN干净的Spring启动启动我的Spring启动应用程序:Run-DprSungBoo.Run.Prrices =本地< /代码>它在引导过程的中间停止。 事
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.3.RELEASE)
2019-03-28 21:06:01.264 INFO 43213 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2019-03-28 21:06:05.129 INFO 43213 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=myApp, profiles=[local], label=mybranch, version=99fd22b9273e757c2afad36deec40442c2cdb69a, state=null
2019-03-28 21:06:05.130 INFO 43213 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='configService', propertySources=[MapPropertySource {name='configClient'}, MapPropertySource {name='/Users/me/dev/projects/mam/repos/myApp-configs/application.yaml'}]}
2019-03-28 21:06:10.506 INFO 43213 --- [ main] c.m.forms.application.Application : The following profiles are active: local
2019-03-28 21:08:04.864 DEBUG 43213 --- [ost-startStop-1] c.m.m.c.a.ApiKeyHeaderFilter : Initializing filter 'apiKeyHeaderFilter'
2019-03-28 21:08:04.865 DEBUG 43213 --- [ost-startStop-1] c.m.m.c.a.ApiKeyHeaderFilter : Filter 'apiKeyHeaderFilter' configured successfully
我已经尝试使用堆大小更大的应用程序启动,但结果相同:mvn clean spring boot:run-Dspring boot.run.profiles=local-Drun.jvmArguments=“-Xms1024m”
我的设置是否达到了大小限制或配置阈值行数
编辑:myAppbootstrap.yaml的相关部分如下所示:
spring:
profiles: local
cloud:
config:
enabled: true
label: mybranch
uri: http://localhost:8888
你确定为本地环境正确设置了配置文件吗?嗨@MS90:当你说“设置配置文件”时,你可能指的是Spring Boot应用程序中的bootstrap.yaml
,对吗?毕竟,我可以通过请求localhost来查看属性文件。我坚信,引导是正确的,因为我能够将它更改为不同的标签,并在不同的分支中处理更短的application.yaml。让我编辑这篇主要文章并添加bootstrap.yaml的摘录。