Initial commit
This commit is contained in:
		
							
								
								
									
										31
									
								
								springboot_01_03_quickstart/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								springboot_01_03_quickstart/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
HELP.md
 | 
			
		||||
target/
 | 
			
		||||
!.mvn/wrapper/maven-wrapper.jar
 | 
			
		||||
!**/src/main/**
 | 
			
		||||
!**/src/test/**
 | 
			
		||||
 | 
			
		||||
### STS ###
 | 
			
		||||
.apt_generated
 | 
			
		||||
.classpath
 | 
			
		||||
.factorypath
 | 
			
		||||
.project
 | 
			
		||||
.settings
 | 
			
		||||
.springBeans
 | 
			
		||||
.sts4-cache
 | 
			
		||||
 | 
			
		||||
### IntelliJ IDEA ###
 | 
			
		||||
.idea
 | 
			
		||||
*.iws
 | 
			
		||||
*.iml
 | 
			
		||||
*.ipr
 | 
			
		||||
 | 
			
		||||
### NetBeans ###
 | 
			
		||||
/nbproject/private/
 | 
			
		||||
/nbbuild/
 | 
			
		||||
/dist/
 | 
			
		||||
/nbdist/
 | 
			
		||||
/.nb-gradle/
 | 
			
		||||
build/
 | 
			
		||||
 | 
			
		||||
### VS Code ###
 | 
			
		||||
.vscode/
 | 
			
		||||
							
								
								
									
										4
									
								
								springboot_01_03_quickstart/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								springboot_01_03_quickstart/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
# 工程简介
 | 
			
		||||
 | 
			
		||||
# 延伸阅读
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										59
									
								
								springboot_01_03_quickstart/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								springboot_01_03_quickstart/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,59 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
			
		||||
    <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.springframework.boot</groupId>
 | 
			
		||||
        <artifactId>spring-boot-starter-parent</artifactId>
 | 
			
		||||
        <version>2.3.12.RELEASE</version>
 | 
			
		||||
        <relativePath/> <!-- lookup parent from repository -->
 | 
			
		||||
    </parent>
 | 
			
		||||
    <groupId>com.yv</groupId>
 | 
			
		||||
    <artifactId>springboot_01_03_quickstart</artifactId>
 | 
			
		||||
    <version>0.0.1-SNAPSHOT</version>
 | 
			
		||||
    <name>springboot_01_03_quickstart</name>
 | 
			
		||||
    <description>springboot_01_03_quickstart</description>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
        <java.version>1.8</java.version>
 | 
			
		||||
    </properties>
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.springframework.boot</groupId>
 | 
			
		||||
            <artifactId>spring-boot-starter-web</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.springframework.boot</groupId>
 | 
			
		||||
            <artifactId>spring-boot-starter-test</artifactId>
 | 
			
		||||
            <scope>test</scope>
 | 
			
		||||
            <exclusions>
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>org.junit.vintage</groupId>
 | 
			
		||||
                    <artifactId>junit-vintage-engine</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
            </exclusions>
 | 
			
		||||
        </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
 | 
			
		||||
    <build>
 | 
			
		||||
        <plugins>
 | 
			
		||||
            <plugin>
 | 
			
		||||
                <groupId>org.apache.maven.plugins</groupId>
 | 
			
		||||
                <artifactId>maven-compiler-plugin</artifactId>
 | 
			
		||||
                <version>3.8.1</version>
 | 
			
		||||
                <configuration>
 | 
			
		||||
                    <source>1.8</source>
 | 
			
		||||
                    <target>1.8</target>
 | 
			
		||||
                    <encoding>UTF-8</encoding>
 | 
			
		||||
                </configuration>
 | 
			
		||||
            </plugin>
 | 
			
		||||
            <plugin>
 | 
			
		||||
                <groupId>org.springframework.boot</groupId>
 | 
			
		||||
                <artifactId>spring-boot-maven-plugin</artifactId>
 | 
			
		||||
            </plugin>
 | 
			
		||||
        </plugins>
 | 
			
		||||
    </build>
 | 
			
		||||
 | 
			
		||||
</project>
 | 
			
		||||
@@ -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