diff --git a/springboot-security-demo/pom.xml b/springboot-security-demo/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..490b25dc908b2ff98461afd1a27f473590a5d1f1 --- /dev/null +++ b/springboot-security-demo/pom.xml @@ -0,0 +1,71 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.6.8 + + + site.cunyu1943 + springboot-security-demo + 0.0.1-SNAPSHOT + springboot-security-demo + springboot-security-demo + + 11 + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.thymeleaf.extras + thymeleaf-extras-springsecurity5 + + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.security + spring-security-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + diff --git a/springboot-security-demo/src/main/java/site/cunyu1943/springbootsecuritydemo/SpringbootSecurityDemoApplication.java b/springboot-security-demo/src/main/java/site/cunyu1943/springbootsecuritydemo/SpringbootSecurityDemoApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..c5cf66d4ca689b15832d7c3cbe500cea0207344a --- /dev/null +++ b/springboot-security-demo/src/main/java/site/cunyu1943/springbootsecuritydemo/SpringbootSecurityDemoApplication.java @@ -0,0 +1,13 @@ +package site.cunyu1943.springbootsecuritydemo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringbootSecurityDemoApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringbootSecurityDemoApplication.class, args); + } + +} diff --git a/springboot-security-demo/src/main/java/site/cunyu1943/springbootsecuritydemo/controller/HelloController.java b/springboot-security-demo/src/main/java/site/cunyu1943/springbootsecuritydemo/controller/HelloController.java new file mode 100644 index 0000000000000000000000000000000000000000..553517d3ca96e0d9d70e96ed5bb475bfda475ce6 --- /dev/null +++ b/springboot-security-demo/src/main/java/site/cunyu1943/springbootsecuritydemo/controller/HelloController.java @@ -0,0 +1,25 @@ +package site.cunyu1943.springbootsecuritydemo.controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * Created with IntelliJ IDEA. + * + * @Package : site.cunyu1943.springbootsecuritydemo.controller + * @ClassName : HelloController.java + * @CreateTime : 2022/6/4 21:59 + * @Version : 1.0 + * @Author : 村雨遥 + * @Email : 747731461@qq.com + * @公众号 : 村雨遥 + * @Website : https://cunyu1943.github.io/JavaPark + * @Description : + */ +@RestController +public class HelloController { + @GetMapping(value ="/hello") + public String hello() { + return "Hello World!"; + } +} diff --git a/springboot-security-demo/src/main/resources/application.yml b/springboot-security-demo/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..f90ed788ac9b4321a93392228b7467c3648cba83 --- /dev/null +++ b/springboot-security-demo/src/main/resources/application.yml @@ -0,0 +1,5 @@ +spring: + security: + user: + name: cunyu1943 + password: cunyu1943@ diff --git a/springboot-security-demo/src/test/java/site/cunyu1943/springbootsecuritydemo/SpringbootSecurityDemoApplicationTests.java b/springboot-security-demo/src/test/java/site/cunyu1943/springbootsecuritydemo/SpringbootSecurityDemoApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..32b0e166aab39e294f350add089b655a28a243e5 --- /dev/null +++ b/springboot-security-demo/src/test/java/site/cunyu1943/springbootsecuritydemo/SpringbootSecurityDemoApplicationTests.java @@ -0,0 +1,13 @@ +package site.cunyu1943.springbootsecuritydemo; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class SpringbootSecurityDemoApplicationTests { + + @Test + void contextLoads() { + } + +}