Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot on Android?

Is it possible to run Spring Boot on an Android device?

Right now I am successfully running a web service on localhost using Spring Boot which I've got building in IntelliJ IDEA. I need to get the same web service code running on an Android device. Is it possible to build the web service app into a JAR file that I can get running on an Android phone? I have a Google Nexus 6P running Android Nougat. I've done some limited research, and have found an application called JBED. So far I haven't been able to get this working.

I've started from scratch and built the example JAR:

gs-spring-boot-0.1.0.jar

and hopefully I can find a way to run this JAR. I'm guessing it probably won't work so if anyone has a better idea that would be great!

like image 810
Lou Morda Avatar asked Sep 19 '16 18:09

Lou Morda


1 Answers

You can use i-jetty to host servlet based apps in android. or embed i-jetty (replacing tomcat or netty) in your spring boot app

like image 161
GiBi Avatar answered Oct 19 '22 13:10

GiBi