Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.yv;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @author YoVinchen
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.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("springBoot4 is running ......");
|
||||
return "springBoot4 is running ......";
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd" >
|
||||
|
||||
<web-app>
|
||||
<display-name>Archetype Created Web Application</display-name>
|
||||
</web-app>
|
5
springboot_01_04_quickstart/src/main/webapp/index.jsp
Normal file
5
springboot_01_04_quickstart/src/main/webapp/index.jsp
Normal file
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<h2>Hello World!</h2>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user