Dockerfile

This commit is contained in:
石皮幼鸟 2024-04-14 19:56:42 +08:00
parent 1b61e9acf6
commit 8ca391ae4e
2 changed files with 17 additions and 1 deletions

14
Dockerfile Normal file
View File

@ -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"]

View File

@ -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);