Skip to content

Instantly share code, notes, and snippets.

@jenciso
Created December 20, 2021 02:51
Show Gist options
  • Save jenciso/3ddb83aa76ac337310b0a9253ccd273e to your computer and use it in GitHub Desktop.
Save jenciso/3ddb83aa76ac337310b0a9253ccd273e to your computer and use it in GitHub Desktop.
create-a-simple-spring-boot-application-with-gradle
package hello;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
}
package hello;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController("/")
public class HelloGradleController {
@GetMapping
public String helloGradle() {
return "Hello Gradle!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment