commit 949472b3440766626edec5212d3ba186df0ecde9 Author: 燕鹏 Date: Fri Nov 27 15:58:12 2020 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2065bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +HELP.md +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..b7a38ef --- /dev/null +++ b/build.gradle @@ -0,0 +1,38 @@ +plugins { + id 'org.springframework.boot' version '2.4.0' + id 'io.spring.dependency-management' version '1.0.10.RELEASE' + id 'java' +} + +group = 'com.aiprose' +version = '0.0.1-SNAPSHOT' +sourceCompatibility = '1.8' + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +repositories { + maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } + maven { url "http://maven.aiprose.com/nexus/content/repositories/public/" } + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-security' + implementation 'org.springframework.boot:spring-boot-starter-web' + compileOnly 'org.projectlombok:lombok' + runtimeOnly 'mysql:mysql-connector-java' + annotationProcessor 'org.projectlombok:lombok' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'io.projectreactor:reactor-test' + testImplementation 'org.springframework.security:spring-security-test' + compile group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0' +} + +test { + useJUnitPlatform() +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..2bb3020 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'scauth' diff --git a/src/main/java/com/aiprose/scauth/ScauthApplication.java b/src/main/java/com/aiprose/scauth/ScauthApplication.java new file mode 100644 index 0000000..f134e22 --- /dev/null +++ b/src/main/java/com/aiprose/scauth/ScauthApplication.java @@ -0,0 +1,13 @@ +package com.aiprose.scauth; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ScauthApplication { + + public static void main(String[] args) { + SpringApplication.run(ScauthApplication.class, args); + } + +} diff --git a/src/main/java/com/aiprose/scauth/conf/WebSecurityConfig.java b/src/main/java/com/aiprose/scauth/conf/WebSecurityConfig.java new file mode 100644 index 0000000..5c50d4c --- /dev/null +++ b/src/main/java/com/aiprose/scauth/conf/WebSecurityConfig.java @@ -0,0 +1,26 @@ +package com.aiprose.scauth.conf; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +/** + * @author nelson + * @desc TODO + * @company 北京中经网软件有限公司 + * @date 2020/11/27 15:32 + * @since 1.0 + */ +@Configuration +public class WebSecurityConfig extends WebSecurityConfigurerAdapter{ + @Override + public void configure(WebSecurity web) throws Exception { +// super.configure(web); + } + + @Override + protected void configure(HttpSecurity http) throws Exception { +// super.configure(http); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..4c39639 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,19 @@ +server: + port: 9982 +spring: + jpa: + hibernate: + ddl-auto: update + show-sql: true + generate-ddl: true + database-platform: org.hibernate.dialect.MySQL8Dialect + datasource: + username: root + password: trgis + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://47.98.109.5:3309/scauth?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + minimum-idle: 3 + maximum-pool-size: 10 + max-lifetime: 1800000 + connection-test-query: SELECT 1 \ No newline at end of file diff --git a/src/test/java/com/aiprose/scauth/ScauthApplicationTests.java b/src/test/java/com/aiprose/scauth/ScauthApplicationTests.java new file mode 100644 index 0000000..b827110 --- /dev/null +++ b/src/test/java/com/aiprose/scauth/ScauthApplicationTests.java @@ -0,0 +1,13 @@ +package com.aiprose.scauth; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class ScauthApplicationTests { + + @Test + void contextLoads() { + } + +}