File tree Expand file tree Collapse file tree
src/main/java/com/example/JavaSpringBoot Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33Basic [ Java Spring Boot] ( https://spring.io/projects/spring-boot ) application
44
5+ # How to Run
56
7+ 1 . use IDE or use command: ``` mvnw spring-boot:run ``` from project root
68## To Do
79
8- - [ x ] [ setup IntelliJ IDE] ( https://www.youtube.com/watch?v=H_XxH66lm3U&t=84s )
9- - [ ] create a basic application using [ sprint initializer] ( https://start.spring.io/ )
10+ - [x ] [ setup IntelliJ IDE] ( https://www.youtube.com/watch?v=H_XxH66lm3U&t=84s )
11+ - [x ] create a basic application using [ sprint initializer] ( https://start.spring.io/ )
1012 - [ Video Example] ( https://www.youtube.com/watch?v=df7Dso9q700&t=565s )
1113- [ ] add basic junit tests
1214- [ ] add cucumber tests/reports
Original file line number Diff line number Diff line change 22
33import org .springframework .boot .SpringApplication ;
44import org .springframework .boot .autoconfigure .SpringBootApplication ;
5+ import org .springframework .web .bind .annotation .GetMapping ;
6+ import org .springframework .web .bind .annotation .RequestParam ;
7+ import org .springframework .web .bind .annotation .RestController ;
58
69@ SpringBootApplication
10+ @ RestController
711public class JavaSpringBootApplication {
812
913 public static void main (String [] args ) {
1014 SpringApplication .run (JavaSpringBootApplication .class , args );
1115 }
1216
17+ // http://localhost:8081/hello?name=Anish
18+ @ GetMapping ("/hello" )
19+ public String hello (@ RequestParam (value = "name" , defaultValue = "World" ) String name ) {
20+ return String .format ("Hello %s!" , name );
21+ }
22+
1323}
You can’t perform that action at this time.
0 commit comments