我有定义的Mule配置
<context:property-placeholder location="classpath:/mule-sw.properties"/>
Run Code Online (Sandbox Code Playgroud)
我还有一个Java自定义组件类,它在我的一个字段上使用@Lookup注释
@Lookup("file-path")
private String path;
Run Code Online (Sandbox Code Playgroud)
考虑到我的"mule-sw.properties"是这样的
file-path=C:/hello.txt
Run Code Online (Sandbox Code Playgroud)
在我启动Mule App之后,我总是得到Deploy Exception
org.mule.api.expression.RequiredValueException: "Required object not found in registry of Type "class java.lang.String" with name "file-path" on object "class component.CustomComponent"
Run Code Online (Sandbox Code Playgroud)
我还尝试使用@Lookup("$ {file-path}")更改@Lookup("文件路径")但没有成功.
谁能给我一个更好的解决方案?任何帮助都非常感谢.
谢谢