I successfully set up a spring boot application to aws using beanstalk
SpingBootAws2Application.java
@SpringBootApplication
public class SpringBootAws2Application {
public static void main(String[] args) {
SpringApplication.run(SpringBootAws2Application.class, args);
}
}
ServletInitializer.java
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SpringBootAws2Application.class);
}
}
My question is, is it possible for me to execute a python algorithm file that was SSH'd into aws earlier?
I am planning to take in a jsonstring by using a GET method. Then pass that json string into a python algorithm. Then send back results from that algorithm.
Please let me know if this do-able
Yes this is possible.
Use a spring RestTemplate to make your GET request. Retrieve the result as a string and path it to python.
This tutorial shows three ways to run python from java
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.