Java:如何为从属性文件中获取的注解属性提供值?

huangapple 未分类评论51阅读模式
英文:

Java: How to provide value to annotation attribute fetched from a properties file?

问题

它总是报错:注解属性WebServiceClient.wsdlLocation的值必须是一个常量表达式

但是我需要从属性文件中加载值,因为在QA/Prod/SIT上,URL是不同的。

我该如何在注解中处理这种情况?

Java:如何为从属性文件中获取的注解属性提供值?

英文:

It always say that The value for annotation attribute WebServiceClient.wsdlLocation must be a constant expression.

But i need to load value from properties file as on QA/Prod/SIT, the URL is different.

How can i manage same in annotation?

Java:如何为从属性文件中获取的注解属性提供值?

huangapple
  • 本文由 发表于 2020年5月29日 18:48:57
  • 转载请务必保留本文链接:https://java.coder-hub.com/62084195.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定