Skip to content

Latest commit

 

History

History

spring-r

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Spring Boot Using R Packages Demo

This repository contains the code for a demo application for GraalVM.

Prerequisites

Note: FastR is no longer under active development and is in maintenance mode. The last released version is 22.3.0.

Preparation

This is a simple Java Spring application that uses GraalVM interoperability to load an R script, which uses typical R packages, lattice in this case.

  1. Download and install GraalVM 22.3.0 with the R language support, using the GraalVM JDK Downloader.

    bash <(curl -sL https://get.graalvm.org/jdk) graalvm-ce-java17-22.3.0 -c 'R'

    Follow the post-install message.

  2. Download or clone the repository and navigate into the spring-r directory:

    git clone https://github.com/graalvm/graalvm-demos
    cd graalvm-demos/spring-r
  3. Run the example:

    mvn spring-boot:run -Dgraalvm.version=22.3.0

Replace "22.1.0" with your version of GraalVM. When the application is ready, open http://localhost:8080/load.

Note: It may take 2-3 minutes to generate the plot.