Skip to content

Instantly share code, notes, and snippets.

@sgaem
Last active June 30, 2019 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sgaem/485c99054f95d6d89cc255270dae0d0e to your computer and use it in GitHub Desktop.
Save sgaem/485c99054f95d6d89cc255270dae0d0e to your computer and use it in GitHub Desktop.
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
public class SampleJbossApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SampleJbossApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(SampleJbossApplication.class, args);
}
@RestController
class HelloController {
@RequestMapping("/hello")
@GetMapping
String hello() {
return "Hello World " + " !";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment