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 Springboot0103QuickstartApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Springboot0103QuickstartApplication.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("springBoot3 is running ......");
|
||||
return "springBoot3 is running ......";
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
# 应用名称
|
||||
spring.application.name=springboot_01_03_quickstart
|
||||
# 应用服务 WEB 访问端口
|
||||
server.port=8080
|
||||
|
||||
|
@@ -0,0 +1,13 @@
|
||||
package com.yv;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class Springboot0103QuickstartApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user