Skip to content

Commit

Permalink
HelloWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
leeesoraaa committed Jul 27, 2024
1 parent 4a7e858 commit e284365
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/main/java/com/example/hello/HelloApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class HelloApplication {

public static void main(String[] args) {
System.out.println("Hello World Test2");
SpringApplication.run(HelloApplication.class, args);
}

@GetMapping(value = "/")
public String doGetHelloWorld() {
return "Hello World";
}

@GetMapping(value = "/korea")
public String doGetHelloKorea() {
return "Hello Korea";
}

}
3 changes: 3 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
spring.application.name=hello

server.port=8080
application.name = hello

0 comments on commit e284365

Please sign in to comment.