How to install the connect app using spring boot?

Hi, I’m new to Jira development, so please bear with me if my question sounds silly.

I’ve been watching tutorials that demonstrate the creation of a Connect app and communication with a Jira cloud instance using both Node.js and Java examples. However, I’m a bit confused about certain aspects.

  • Is it necessary for the key to be a UUID with a maximum length of 64 characters, or can I use an example similar to the one mentioned in the tutorials just like atlassian-connect-spring-boot-sample-thymeleaf will do?
{
  "key": "atlassian-connect-spring-boot-sample-thymeleaf",
  "baseUrl": "${addon.base-url}",
  "name": "Atlassian Connect Spring Boot Thymeleaf Sample",
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/installed",
    "uninstalled": "/uninstalled"
  },
......
......
......
}
  • How to install the app after my application is up and running?

When I read the tutorial of node.js, there is a credentials.json file that indicates the remote jira cloud instance. And when they launch the application, the app got installed automatically. What should I do using spring boot?

{
  "hosts": {
    "https://*******.atlassian.net": {
      "product": "jira",
      "username": "******@***.com",
      "password": "*******"
    }
  }
}
  • How the network traffic works?
    I am asking this because our company has a site located in China, as well as some others in the US. It is crucial for us to ensure that all of our colleagues can access the Connect app. Once the Connect app is installed in my Jira instance, how the traffic flow during request processes?
  • Does the traffic flow as follows?
    • Do the users’ requests go directly to my server, where the Spring Boot application runs, and my server then sends the response back to the users?
    • Or does the request get sent to Jira, which in turn forwards it to my app, and my app sends the response back to Jira?

Thanks!

Hi @RogerFan

Welcome to the community.

Developing a cloud app can be a bit overwhelming, I know I was when I first started.
Currently I have one cloud app that I build using the Atlassian Connect Spring Boot libraries.

  • Is it necessary for the key to be a UUID with a maximum length of 64 characters, or can I use an example similar to the one mentioned in the tutorials just like atlassian-connect-spring-boot-sample-thymeleaf will do?

The Key is basically a system identifier that is also be human readable. I would not use a UUID myself but instead use something that describes the app, like my-first-app or my-brilliant-integration which say more then a UUID.

  • How to install the app after my application is up and running?

I assume you mean during development.

You can use ngrok to start a tunnel that would allow you to install the app on your Jira Cloud instance simply install the tool and run ngrok http 8080 if your app is running on 8080. You will get a https url you can use to install the app on your Jira Cloud instance like this, https://096fcdcb7106.ngrok.app.

Before you run your app locally using your IDE or the Spring Boot libraries to start your app, simply update the baseUrl in your descriptor to use the url provided by the ngrok tool. Then start you app and install it on your Jira Cloud instance.
In your cloud instance simply go to https://[your-instance-name].atlassian.net/plugins/servlet/upm and click on Upload app (If this option is not available click on settings first to enable Development mode.) and provide the ngrok url to install the app.

After this you can start using/debugging your app.

Hope this helps.

Cheers,
Mark

2 Likes

Hi @markrekveld

Thanks so much for your reply. I have installed my application into Jira using the upload app with the help of Ngrok. I’m really glad to see that it’s working. Thanks again :tada: :tada: :tada:.

Many thanks,
Roger

sure thing, have fun coding