Dockerfile
This commit is contained in:
parent
1b61e9acf6
commit
8ca391ae4e
|
@ -0,0 +1,14 @@
|
||||||
|
# 添加 Java 17 镜像来源
|
||||||
|
FROM openjdk:17
|
||||||
|
|
||||||
|
# springboot 端口
|
||||||
|
EXPOSE 3536
|
||||||
|
|
||||||
|
# 作者
|
||||||
|
LABEL maintainer="spyn <2960474346@qq.com>"
|
||||||
|
|
||||||
|
# 添加 Spring Boot 包
|
||||||
|
ADD target/catch-the-letters-*.jar app.jar
|
||||||
|
|
||||||
|
# 执行启动命令
|
||||||
|
ENTRYPOINT ["java","-Duser.timezone=GMT+8","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
|
|
@ -2,8 +2,8 @@ package com.example.catchTheLetters;
|
||||||
|
|
||||||
import com.example.catchTheLetters.controller.LevelController;
|
import com.example.catchTheLetters.controller.LevelController;
|
||||||
import com.example.catchTheLetters.entity.Level;
|
import com.example.catchTheLetters.entity.Level;
|
||||||
import com.example.catchTheLetters.service.LevelService;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
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;
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ class TestInsertLevel {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Disabled
|
||||||
@Test
|
@Test
|
||||||
void testInsertLevel() {
|
void testInsertLevel() {
|
||||||
// 存20个关卡
|
// 存20个关卡
|
||||||
|
@ -67,6 +68,7 @@ class TestInsertLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Disabled
|
||||||
@Test
|
@Test
|
||||||
void insertALevel() {
|
void insertALevel() {
|
||||||
var type = new Random().nextInt(2);
|
var type = new Random().nextInt(2);
|
||||||
|
|
Loading…
Reference in New Issue