如何在注释内获取属性值。例如我有一个注释注释中的弹簧属性值
@GetMyValue(value1="Val1",intVal=10)
现在我想让“Val1”和10来自属性文件。我试过
@GetMyValue(value1="${test.value}",intVal="${test.int.value}")
哪个不行。
我明白我可以使用
@Value("${test.value}")
String value;
@Value("${test.int.value}")
int intValue;
,我不希望出现这种情况,它必须是一个注释中。有什么建议么?