Java:如何为从属性文件中获取的注解属性提供值? huangapple 8089文章 0评论 2020年5月29日 18:48:57未分类评论51阅读模式 英文: Java: How to provide value to annotation attribute fetched from a properties file? 问题 它总是报错:注解属性WebServiceClient.wsdlLocation的值必须是一个常量表达式。 但是我需要从属性文件中加载值,因为在QA/Prod/SIT上,URL是不同的。 我该如何在注解中处理这种情况? 英文: 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语言的经验与见解,让所有开发者获益! 点赞 https://java.coder-hub.com/62084195.html 复制链接 复制链接
评论