Last active
December 21, 2020 21:36
-
-
Save joshlong/d8768b697a73b62bf42d8b74ec43b760 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env curl -LSs https://sh.jbang.dev | bash -s - "$0" "$@"; exit $? | |
//DEPS org.springframework.boot:spring-boot-starter-web:2.3.4.RELEASE | |
import org.springframework.web.bind.annotation.*; | |
import org.springframework.boot.*; | |
import org.springframework.boot.autoconfigure.*; | |
import org.springframework.context.*; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.context.annotation.*; | |
import java.util.Collections; | |
import static java.lang.System.*; | |
@EnableAutoConfiguration | |
@Configuration | |
@RestController | |
public class GreetingsServer { | |
@GetMapping("/") | |
java.util.Map<String, String> index() { | |
return Collections.singletonMap("greetings", "Hello, world!"); | |
} | |
public static void main(String... args) { | |
SpringApplication.run(GreetingsServer.class, args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment