在springboot应用程序中的@Table类中读取属性

时间:2019-08-06 11:51:57

标签: spring scala spring-boot

我在springboot应用程序中有一个课

@Table("abc")
class ABCDAO{
//getters and setters
}

在此类中,我想从application.properties文件或系统环境访问属性。

我尝试过

@Value("${test}")
val test: String = ""

但无法读取相同内容。

0 个答案:

没有答案