My task is to allow Spring Boot to work with Jolie, something like Kotlin support for Spring Boot. A very important tool in build configuration is the kotlin-maven-plugin, which allows compilation of Kotlin sources and - through pluginOptions - links spring's functionalities into a project. Knowing that, I definitely have to create a jolie-maven-plugin, which would be responsible for compiling Jolie sources in a project. That I will be able to do because Jolie comes with the Compiler Java class, but that still is not combining Spring Boot's abilities with Jolie's, yet. Let's take a look at a simple Spring Boot Controller using Kotlin:

import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.ui.set
import org.springframework.web.bind.annotation.GetMapping

@Controller
class HtmlController {

  @GetMapping("/")
  fun blog(model: Model): String {
    model["title"] = "Blog"
    return "blog"
  }

}

We see, that Spring Boot is doing a lot of work for us just by marking classes/methods with proper annotations. The main problem for me is how to allow these Spring Boot functionalities through my jolie-maven-plugin?

Another small issue might be that there isn't anything called "class" in Jolie - a microservice-based language. After looking at this simple Jolie program, can I assume that it is the main code block that I should treat as the equivalent of class and would be marked with @SpringBootAplication or @RestController etc.?

0 Answers