SpringBoot配置内容提交
This commit is contained in:
parent
31a4ef5470
commit
8ff8fbd317
9
pom.xml
9
pom.xml
|
@ -22,6 +22,10 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-aop</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.module</groupId>
|
<groupId>com.fasterxml.jackson.module</groupId>
|
||||||
<artifactId>jackson-module-kotlin</artifactId>
|
<artifactId>jackson-module-kotlin</artifactId>
|
||||||
|
@ -51,6 +55,11 @@
|
||||||
<version>3.0.3</version>
|
<version>3.0.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>8.0.33</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -2,8 +2,12 @@ package com.xlf.dromstarkotlin
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||||
import org.springframework.boot.runApplication
|
import org.springframework.boot.runApplication
|
||||||
|
import org.springframework.context.annotation.EnableAspectJAutoProxy
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
@EnableAspectJAutoProxy
|
||||||
|
@EnableScheduling
|
||||||
class DromStarKotlinApplication
|
class DromStarKotlinApplication
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://192.168.5.190:3306
|
||||||
|
username: dormstar
|
||||||
|
password: 114477225588
|
|
@ -2,12 +2,32 @@ package com.xlf.dromstarkotlin
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.springframework.boot.test.context.SpringBootTest
|
import org.springframework.boot.test.context.SpringBootTest
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
class DromStarKotlinApplicationTests {
|
class DromStarKotlinApplicationTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun contextLoads() {
|
fun contextLoads() {
|
||||||
|
var token = (Date().time/1000).toString()
|
||||||
|
val random = Random()
|
||||||
|
// 判定随机范围
|
||||||
|
var i: Int
|
||||||
|
var j = 0
|
||||||
|
while (j++ < 3) {
|
||||||
|
val x: Int = if(j == 1 || j == 2) 6 else 10
|
||||||
|
token += "-"
|
||||||
|
i = 0
|
||||||
|
while (i < x) {
|
||||||
|
if (random.nextBoolean()) {
|
||||||
|
token += random.nextInt(10)
|
||||||
|
} else {
|
||||||
|
token += random.nextInt(97, 123).toChar()
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println(token)
|
||||||
|
assert(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user