燕鹏 před 4 roky
revize
949472b344
  1. 37
      .gitignore
  2. 38
      build.gradle
  3. 1
      settings.gradle
  4. 13
      src/main/java/com/aiprose/scauth/ScauthApplication.java
  5. 26
      src/main/java/com/aiprose/scauth/conf/WebSecurityConfig.java
  6. 19
      src/main/resources/application.yml
  7. 13
      src/test/java/com/aiprose/scauth/ScauthApplicationTests.java

37
.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/

38
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()
}

1
settings.gradle

@ -0,0 +1 @@
rootProject.name = 'scauth'

13
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);
}
}

26
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);
}
}

19
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

13
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() {
}
}
Načítá se…
Zrušit
Uložit