|
1 | 1 | # springboot-kotlin-dynamic-compiler
|
2 | 2 | SpringBoot-Kotlin-Dynamic-Compiler
|
| 3 | + |
| 4 | +# Getting started |
| 5 | +1. git clone https://github.com/KingFalse/springboot-kotlin-dynamic-compiler.git |
| 6 | +2. mvn package |
| 7 | +3. java -jar SpringBoot-Kotlin-Dynamic-Compiler.jar |
| 8 | +4. Enjoy! |
| 9 | +```shell script |
| 10 | +curl --location --request POST 'http://127.0.0.1:8080/exec' \ |
| 11 | +--header 'Content-Type: text/plain' \ |
| 12 | +--data-raw 'package me.kagura.dynamiccompiler.script |
| 13 | +import me.kagura.dynamiccompiler.script.Worker |
| 14 | + |
| 15 | +class KaguraWorker : Worker { |
| 16 | + override fun doWork(): String { |
| 17 | + return "https://www.kagura.me/" |
| 18 | + } |
| 19 | +}' |
| 20 | +``` |
0 commit comments