Hello,
I have properties file in resources folder in my Spring plugin project, named "my-field.properties"
In my class I tried to return message from field description, but I getting null value.
@Inject
protected ApplicationProperties applicationProperties;
{...}
protected String getStringError(){
return applicationProperties.getDefaultBackedText("my-field.properties.description");
}
Whats problem?
Hello,
Here is what Jira generates by default
@ExportAsService ({MyPluginComponent.class})
@Named ("myPluginComponent")
public class MyPluginComponentImpl implements MyPluginComponent
{
@ComponentImport
private final ApplicationProperties applicationProperties;
@Inject
public MyPluginComponentImpl(final ApplicationProperties applicationProperties)
{
this.applicationProperties = applicationProperties;
}
public String getName()
{
if(null != applicationProperties)
{
return "myComponent:" + applicationProperties.getDisplayName();
}
return "myComponent";
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.