# spring-boot-2048 **Repository Path**: lbtooth/spring-boot-2048 ## Basic Information - **Project Name**: spring-boot-2048 - **Description**: https://code.aliyun.com/flow-example/spring-boot-2048.git - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 3 - **Created**: 2025-02-27 - **Last Updated**: 2025-12-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Spring Boot Example ==== 示例代码库Spring boot 测试代码版本的更新 内置 2048 静态页面 ![image-20251120114900320](images/image-20251120114900320.png) ## 1 传统方式构建 ```bash #只支持JAVA-8,不支持JAVA-2 [root@ubuntu2404 ~]#apt update && apt -y install openjdk-8-jdk maven [root@ubuntu2404 ~]#mvn -v Apache Maven 3.8.7 Maven home: /usr/share/maven Java version: 1.8.0_462, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.8.0-48-generic", arch: "amd64", family: "unix" #加速配置 [root@ubuntu2404 ~]#vim /etc/maven/settings.xml ..... aliyunmaven * 阿里云公共仓库 https://maven.aliyun.com/repository/public [root@ubuntu2404 ~]#git clone https://gitee.com/lbtooth/spring-boot-2048.git [root@ubuntu2404 ~]#cd spring-boot-2048/ #构建 [root@ubuntu2404 spring-boot-2048]#mvn clean package -Dmaven.test.skip=true [root@ubuntu2404 spring-boot-2048]#ls -l target/application.jar -rw-r--r-- 1 root root 16442247 Nov 20 11:47 target/application.jar #运行 [root@ubuntu2404 spring-boot-2048]#java -jar target/application.jar . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.9.RELEASE) ``` ## 2 容器化构建 ```bash [root@ubuntu2404 ~]#apt update && apt -y install docker.io [root@ubuntu2404 ~]#git clone https://gitee.com/lbtooth/spring-boot-2048.git [root@ubuntu2404 ~]#cd spring-boot-2048/ #构建镜像 [root@ubuntu2404 spring-boot-2048]#docker build -t registry.cn-beijing.aliyuncs.com/wangxiaochun/spring-boot-2048:v1.0 . #运行 [root@ubuntu2404 ~]#docker run --name spring-boot-2048 -p 80:80 registry.cn-beijing.aliyuncs.com/wangxiaochun/spring-boot-2048:v1.0 ```