https://github.com/answerail/springboot-mybatis-web
SpringBoot整合Mybatis实现基础Web服务以及项目镜像构建发布等
https://github.com/answerail/springboot-mybatis-web
mybatis spring-boot-mybatis spring-boot-web springboot web
Last synced: 4 months ago
JSON representation
SpringBoot整合Mybatis实现基础Web服务以及项目镜像构建发布等
- Host: GitHub
- URL: https://github.com/answerail/springboot-mybatis-web
- Owner: AnswerAIL
- Created: 2018-10-16T06:34:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T02:34:51.000Z (over 6 years ago)
- Last Synced: 2024-12-31T15:26:05.755Z (6 months ago)
- Topics: mybatis, spring-boot-mybatis, spring-boot-web, springboot, web
- Language: Java
- Homepage: https://github.com/AnswerAIL/springboot-mybatis-web
- Size: 65.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SpringBoot-MyBatis-Web
- SpringBoot实现基础Web框架### 新建项目步骤(以IDEA为例)
1. File -> New -> Project -> Spring Initializr -> Next(选择JDK版本)
2. 设置 Group 和 Artifact 值
- Group: com.answer 域.公司名称
- 域: com(商业组织) org(非营利组织)
- Artifact: springboot-mybatis-web 项目名称
### 启动服务
```bash
nohup java -jar springboot-mybatis-web-0.0.1-SNAPSHOT.jar >> smw.log 2>&1 &
```
### 服务器构建项目镜像
```bash
# 在POM中声明构建信息: pom_pom.xml 使用Dockerfile: pom.xml + Dockerfile
# 进入项目目录
cd /root/answer/docker/springboot-mybatis-web
# 编译 Docker 镜像
mvn package docker:build -Dmaven.test.skip=true -X
# 启动一个容器实例
docker run -d -p 8088:8888 -v /root/answer/docker/data:/home --name smw IMAGE_ID
```