Spring Boot 自动配置 spring.factories [英] Spring Boot Auto Config spring.factories

查看:201
本文介绍了Spring Boot 自动配置 spring.factories的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照说明操作 此处 提供自定义 RestTemplate.

I'm following the instructions here to provide a custom RestTemplate.

  • 我已经创建了 spring.factories 文件并验证它在META-INF 目录或 JAR.

  • I've created the spring.factories file and verified that it is in the META-INF directory or the JAR.

我已经按照描述创建了类.

I've created the class as described.

我在我的

CustomConfigServiceBootstrapConfiguration 并且它们在我运行应用程序后不会出现.

CustomConfigServiceBootstrapConfiguration and they do not appear after I run the application.

似乎 spring.factories 文件被忽略了.

It seems like the spring.factories file is being ignored.

如何让应用程序加载我的 spring.factories 文件?

How can I make the application load my spring.factories file?

推荐答案

尝试添加配置:

spring.cloud.config.enabled=false

并且请在下次提供您的 spring-cloud 版本

and pls provide your version of spring-cloud nexttime

这篇关于Spring Boot 自动配置 spring.factories的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆