腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(2541)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
1
回答
Spring
propertySource
在这里,我正在开发一个遗留应用程序,并且我正在尝试使用Spring @
PropertySource
注释。我面临的问题是文件名是build.dev.properties,而我的配置是: @
PropertySource
("classpath:build.
浏览 0
修改于2016-02-24
得票数 0
2
回答
远程
PropertySource
是否有人成功地构建了一个使用远程源(例如数据库)来检索属性值的
PropertySource
。其想法是构建一个
PropertySource
(需要一些连接信息,比如主机/端口)并将其插入到PropertySourcePlaceholderConfigurer中。 问题似乎是鸡和蛋的问题。如何才能将连接信息下载到
PropertySource
?我可以先用配置实例化PropertySourcePlaceholderConfigurer,然后用远程主机和端口属性加载属性文件,然后实例化
PropertySource
并将其注入
浏览 6
提问于2014-08-12
得票数 5
回答已采纳
1
回答
Spring PropertySourcesPlaceholderConfigurer不对@
PropertySource
使用自定义
PropertySource
。
我一直试图获得一个在Spring中运行的自定义
PropertySource
的非常基本的示例。这是我的
PropertySource
: public RemotePropertySourcegetPropertySources().addFirst(remotePropertySource); System.out.println("Initializer registered
Prope
浏览 5
提问于2017-05-11
得票数 4
回答已采纳
1
回答
自举
PropertySource
序
我认为这个问题与处理PropertySources的顺序有关,但我无法在尤里卡之前成功地注入Vault的
PropertySource
。在启用了Spring调试日志之后,我相信Vault
PropertySource
确实存在,但出于某种原因没有被使用。
浏览 0
修改于2017-04-07
得票数 6
回答已采纳
1
回答
@
PropertySource
值重写
在我的Springboot应用程序中,我声明:在原木里, Converting
PropertySource
org.springframework.bo
浏览 3
提问于2020-05-15
得票数 1
回答已采纳
1
回答
PropertiesFactoryBean vs @
PropertySource
menu.propertiesmenu.option=option1,option2,option3@Configuration@ComponentScan(basePackages = { "com.test.*" })publicproperty name="location" value="classpath:men
浏览 3
修改于2015-04-16
得票数 1
1
回答
Spring @
PropertySource
刷新
如何在春季刷新@PropertySouce(propertyFile)。 MY_APP_NAME=MY APPLICATION @Autowired Enviornment env;之后,我想将属性从“"APPLICATION". MY APPLICATION”改为"MY APPLICATION“。它将需要重新启动应用程序,但我不想重新启动应用程序,我希望当我更改属性时,它会在几秒钟后在应用程序中反映出来。
浏览 0
修改于2018-07-18
得票数 1
3
回答
可选的@
PropertySource
位置
@Configuration @
PropertySource
({ "classpath:default.properties", "file:${java:comp/env/configLocation使用@
PropertySource
可以做到这一点吗?或者有其他解决方案吗?
浏览 1
修改于2013-07-02
得票数 16
回答已采纳
1
回答
Spring
PropertySource
返回空
.");BrowserConfiguration.java@
PropertySource
("file:.
浏览 1
提问于2017-04-29
得票数 2
回答已采纳
5
回答
通过@Import重写Spring @
PropertySource
我在类DefaultConfig中有一个属性test=default,我使用@
PropertySource
注释使它们可用。@Configurationpublic class DefaultConfig {}@Import(DefaultCon
浏览 2
修改于2013-03-23
得票数 13
18
回答
Spring @
PropertySource
使用YAML
例如,这不起作用:@
PropertySource
(value = "classpath:application-test.yml")db: url: jdbc
浏览 22
修改于2021-04-22
得票数 146
回答已采纳
1
回答
Spring - @
PropertySource
,获取NPE ;(
我在使用@
PropertySource
时遇到了一些问题,我在使用env.getProperty(..)时得到了一个NPE。有人有洞察力吗?.*; } return artist;
浏览 0
修改于2015-05-17
得票数 1
回答已采纳
1
回答
ResourceBundle在春季成为
PropertySource
PropertySource
演示了如何使用@
PropertySource
将属性文件键/值对注入spring上下文。@Configurationpublic class FooBar { @Value("${my.key
浏览 4
提问于2014-06-11
得票数 0
1
回答
基于环境的Spring
PropertySource
我想在
PropertySource
值选项中使用一个动态占位符。@
PropertySource
("classpath:ione.properties")@
PropertySource
("classpath:ione-{optionalEnvName
浏览 0
修改于2018-10-08
得票数 1
回答已采纳
1
回答
Spring @
PropertySource
动态设置路径
此应用程序具有配置文件,该配置文件将使用@
PropertySource
加载,当前将此路径设置为"class- path :“。import org.springframework.context.annotation.
PropertySource
org.springframework.core.env.Environment; import org.springframework.stereot
浏览 1
提问于2017-09-12
得票数 2
回答已采纳
1
回答
@
PropertySource
java.io.FileNotFoundException
因此,我在.properties中创建了一个src/main/resources/application-config.properties文件,配置类如下所示:@
PropertySource
浏览 3
修改于2017-07-08
得票数 0
2
回答
Spring @
PropertySource
不存在,无法打开
应用程序类如下所示: @Configuration@
PropertySource
(value(value = "classpath*:application.properties")@
PropertySource
(value = &qu
浏览 43
提问于2019-02-19
得票数 1
回答已采纳
1
回答
@
PropertySource
与Spring Git的使用
我使用@
PropertySource
来配置一个配置类:@
PropertySource
("classpath:/mongo-${env}.properties")@
PropertySource
("file:///C://.
浏览 0
提问于2019-05-21
得票数 3
回答已采纳
1
回答
@
PropertySource
中的File.separator
我希望在我的@
PropertySource
注释中的路径中包含一个'/‘或'\’,这样它就可以在Linux或Windows下运行。我试过了和一些变化,但没有运气。如何在我的@
PropertySource
中包含与平台无关的文件路径分隔符?
浏览 0
提问于2018-05-07
得票数 1
回答已采纳
1
回答
使用@
PropertySource
配置Spring属性
在下面的Spring类中,我通过@
PropertySource
加载app.properties文件,并使用属性文件中的配置构建两个不同的DBCP数据源。@Configurationpublic class DAOConfig {@Configuration @
PropertySource
("cla
浏览 2
修改于2014-06-01
得票数 2
回答已采纳
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券