Hey Guys,
I'm trying to get the base url for my Jira server instance using the application properties but i am having a bit of trouble. I am using the default code that was generated by the SDK but it doesn't seem to be working. For more insight:
Import
import com.atlassian.sal.api.ApplicationProperties;
Class
public class Class implements Interface
{
@ComponentImport
private final ApplicationProperties applicationProperties;
Constructor
@Inject
public Class(final ApplicationProperties applicationProperties)
{
this.applicationProperties = applicationProperties;
}
Code
public String getCurrentAppBaseUrl()
{
return applicationProperties.getBaseUrl(UrlMode.CANONICAL);
}
The above code returns null. Am i missing something? I even added the dependency in the pom.xml to be sure.
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>4.0.0-490c946</version>
<scope>provided</scope>
</dependency>
Any help is appreciated as I am on a time crunch.
Hey @Alexey Matveev that is actually there. Everything that was generated by the SDK is in my current code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.