# springboot-web-thymeleaf **Repository Path**: chenzz/springboot-web-thymeleaf ## Basic Information - **Project Name**: springboot-web-thymeleaf - **Description**: 最简单的spring boot web 示例,message的curd演示操作,没有使用数据库,数据都保持在内存中 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-10-22 - **Last Updated**: 2024-05-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 简介 最简单的spring boot web 示例,message的curd演示操作 没有使用数据库,数据都保持在内存中 因为没有用到数据库,所以可以用来检测服务器java环境是否正确安装 - 使用mvn/mvnw命令打包项目,生成jar文件 - 将jar文件,application配置文件放到服务器目录 - 指定端口运行`java -jar xxx.jar --server.port=9999` - 启动成功后浏览页面查看是否正常运行 # maven打包及启动 ```shell # 打包 mvn clean package '-Dmaven.test.skip=true' # 后台启动并指定配置文件(推荐第一种) nohup java -jar ./sb-admin.jar --spring.profiles.active=prod > __log.txt 2>&1 & nohup java -jar ./sb-admin.jar --spring.profiles.active=prod > __log.txt & # 指定配置文件启动, 前台运行 java -jar /home/jar/demo.jar --spring.profiles.active=prod # 在服务器验证启动结果 curl -v http://localhost:9000 # 查看java进程 jps ``` ### 仓库地址 - [github仓库](https://github.com/cschenzz/springboot-web-thymeleaf) - [gitee仓库](https://gitee.com/chenzz/springboot-web-thymeleaf) ### 打包命令 `mvn clean package -Dmaven.test.skip=true` `mvnw clean package -Dmaven.test.skip=true` 在powershell和git shell中执行mvnw会提示错误,请使用当前目录执行命令`./mvnw clean package` ### 运行截图 ![](screenshot/home.png) ![](screenshot/detail.png) ![接口](screenshot/api-json.png)