简体   繁体   English

是否有可能有一个可以执行 R 脚本的独立 spring boot jar?

[英]Is it possible to have a self-contained spring boot jar which can execute R scripts?

I have a spring boot + react application.我有一个 spring boot + react 应用程序。 The cool thing about spring boot is thus that it is able to run two different languages, namely Java and JavaScript anywhere without having to install many of the prerequisites like application or web servers.因此,spring boot 很酷的一点是,它能够在任何地方运行两种不同的语言,即 Java 和 JavaScript,而无需安装许多先决条件,例如应用程序或 Web 服务器。

My question is whether it is also possible to add a third language, namely R, such it is also completely contained in the JAR.我的问题是是否也可以添加第三种语言,即 R,它也完全包含在 JAR 中。 And if yes is there any good framework and a tutorial?如果是,是否有任何好的框架和教程?

There is a walkthrough of one such instance here: https://medium.com/graalvm/enhance-your-java-spring-application-with-r-data-science-b669a8c28bea这里有一个这样的实例的演练: https : //medium.com/graalvm/enhance-your-java-spring-application-with-r-data-science-b669a8c28bea

The demo application is found: https://github.com/graalvm/graalvm-demos找到演示应用程序: https : //github.com/graalvm/graalvm-demos

In order to complete this, you must download GraalVM and add it to the path.为了完成此操作,您必须下载 GraalVM 并将其添加到路径中。 You will also have to download any necessary dependencies for the particular project you are doing.您还必须为您正在执行的特定项目下载任何必要的依赖项。

As far as packaging it all as a JAR, I would assume it is possible since everything is done within the project.就将其全部打包为 JAR 而言,我认为这是可能的,因为一切都在项目中完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM