Skip to content

Instantly share code, notes, and snippets.

@ElderMael
Created November 12, 2016 23:18
Show Gist options
  • Save ElderMael/ff31a0ed63dccbe2530558b4c525d336 to your computer and use it in GitHub Desktop.
Save ElderMael/ff31a0ed63dccbe2530558b4c525d336 to your computer and use it in GitHub Desktop.
import org.springframework.boot { ... }
import org.springframework.boot.autoconfigure { ... }
import org.springframework.stereotype { ... }
import org.springframework.web.bind.annotation { ... }
import java.lang { JString=String }
import ceylon.interop.java { javaClass, javaString }
controller
enableAutoConfiguration
shared class SampleController() {
requestMapping({ "/" })
responseBody
shared JString home() {
return javaString("Hello World!");
}
}
shared void run() {
SpringApplication.run(javaClass<SampleController>());
}
@ElderMael
Copy link
Author

Ceylon <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment