chore: add test oopp learning project structure
This commit is contained in:
parent
fae4b5870e
commit
86bfb9084a
13 changed files with 661 additions and 0 deletions
|
@ -0,0 +1,16 @@
|
|||
package me.stvnliu.tudelft.lab.spring;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package me.stvnliu.tudelft.lab.spring;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class RequestController {
|
||||
Logger logger = LoggerFactory.getLogger(RequestController.class);
|
||||
|
||||
@GetMapping("/")
|
||||
public String index() {
|
||||
logger.info("A user requested the root page!");
|
||||
return "Spring Boot is working!";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
spring.application.name=spring
|
||||
server.port=2000
|
Loading…
Add table
Add a link
Reference in a new issue