An open API service indexing awesome lists of open source software.

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服务以及项目镜像构建发布等

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
```