0
votes

I'm stuck trying to deploy my restfull app I have developped with Spring. It is working on localhost, giving me the expected result when questionning my differents routes I have made with @RequestMapping(/xxx) using cUrl.

Now I would like to try to deploy it to azure so I would be able to cUrl it but with the azure's url (is that clear?).

I have tried these methods:

  1. Directly via the eclipse azure plugin (see below)
  2. Using the Azure app Service for container : https://docs.microsoft.com/en-us/azure/java/spring-framework/deploy-spring-boot-java-app-on-linux
  3. By deploying a JAR : https://docs.microsoft.com/fr-fr/azure/java/spring-framework/deploy-spring-boot-java-app-with-maven-plugin
  4. Some others tricks that I have found on the web

But I m always stuck on this page and the app is not responding to my cUrls calls. Any idea on what I may be doing wrong? enter image description here

The eclipse plugin: enter image description here

1

1 Answers

0
votes

If this is a Spring Boot application with embedded Tomcat in the JAR, use the Java SE Image available on App Services.

enter image description here

Re-name the JAR file to app.jar

Then, upload it to the WebApp (you can use FTP for simplicity). Place the JAR file to /home/site/wwwroot path.

You can also provide a startup command (Check Configurations blade -> General Settings):

java -jar /home/site/wwwroot/app.jar

If you are using .war package, try using wardeploy API:

https://github.com/projectkudu/kudu/wiki/Deploying-WAR-files-using-wardeploy