Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.yv;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @author YoVinchen
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class Springboot0102QuickstartApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Springboot0102QuickstartApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package com.yv.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Rest模式
|
||||
*
|
||||
* @author YoVinchen
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/books")
|
||||
public class BookController {
|
||||
@GetMapping
|
||||
public String getById() {
|
||||
System.out.println("springBoot2 is running ......");
|
||||
return "springBoot2 is running ......";
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
|
@@ -0,0 +1,13 @@
|
||||
package com.yv;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class Springboot0102QuickstartApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user