我想在注释字段中使用配置值,字段不是字符串。例如我有:
@Document(indexName = "#{@transactionIndexName}", shards = 1,
refreshInterval = "2s", versionType = VersionType.EXTERNAL)
所以在indexName我使用spring spel,但shards是短类型值,那么我如何使用yml文件中的设置?
我想在注释字段中使用配置值,字段不是字符串。例如我有:
@Document(indexName = "#{@transactionIndexName}", shards = 1,
refreshInterval = "2s", versionType = VersionType.EXTERNAL)
所以在indexName我使用spring spel,但shards是短类型值,那么我如何使用yml文件中的设置?