springboot+mybatis+vueWEB项⽬简易搭建⽂档
图书管理系统架构⽂档
摘要
图书管理系统,拟⽤MySql作数据库,使⽤SpringBoot作为后端架构,并使⽤Maven作为后端项⽬管理组件,Java语⾔,数据库与后端稳定连接架构MyBatis,Vue作为前端架构。
系统搭建步骤
1、数据库搭建
(1) 安装MySql;
在⽹上下载mysql安装包,解压并安装(或直接安装)。
(2) 配置MySql(⾮必要);
说明:给mysql配置环境变量后我们就可以在cmd⾥运⾏mysql(开启、停⽌等操作)
\1. 和其实环境变量的配置⽅法⼀样,我们打开环境变量配置窗⼝(组合键win+Pause -> 更改设置 -> 系统属性⾥选择“⾼级” -> 环境变量)
\2. 选中系统变量中的“path”,在path值开头处输⼊mysql安装⽬录下的bin⽂件夹所在路径:C:\Program Files\MySQL\MySQL Server 5.7\bin,保存退出
注意:mysql server安装的默认路径为:C:\Program Files\MySQL\MySQL Server 5.7
\3. 测试是否配置成功:打开cmd,输⼊“
mysql -u root -p”回车,然后输⼊mysql安装时设置的root账号的密码(123456),若提⽰“Welcome to the MySQL monitor.”说明配置成功了。
(3) 启动mysql服务;
管理员的⾝份运⾏cmd(或进⼊mysql⽬录),输⼊“net start xxx”(xxx 为⾃⼰在安装时设置的服务器名称)
(4) 创建表,并新增数据;
建议使⽤navicat运⾏.sql⽂件。
2、后端框架搭建
(1) 使⽤Maven搭建SpringBoot项⽬;
新建项⽬:
设置项⽬名:springboot aop
创建好Maven项⽬之后如下:
设置Maven仓库及配置⽂件位置:
(2) 安装依赖,及MyBatis组件
将Maven管理项⽬下的l⽂件中添加以下依赖:
<!--spring boot启动⽗依赖-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
<relativePath/><!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
&porting.outputEncoding>UTF-8</porting.outputEncoding> <java.version>1.8</java.version>
</properties>
<!--依赖-->
<dependencies>
<dependencies>
<dependency><!--aop切⾯编程-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency><!--数据库-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency><!--java_Web项⽬-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency><!--项⽬健康监控-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency><!--java项⽬监控-->
<groupId&decentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId&decentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.1.0</version>
</dependency>
<dependency><!--javax扩展库_javaEE_Api-->
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency><!--简化调⽤com和Win32程序库-->
<groupId>com.jacob</groupId>
<artifactId>jacob</artifactId>
<version>1.19</version>
</dependency>
<dependency><!--Mybatis启动-->
<groupId&batis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>
<dependency><!--⽇志⽂件-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.3.8.RELEASE</version>
</dependency>
<dependency><!--测试-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency><!--常⽤⼯具API集合-->
<groupId>org.apachemons</groupId>
<artifactId>commons-lang3</artifactId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency><!--⽤于操作JAVA BEAN的⼯具包(Spring Bean是被实例的,组装的及被Spring 容器管理的Java对象)--> <groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
<dependency><!--mysql数据库连接-->
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
</dependency>
<dependency><!-- alibaba的druid数据库连接池 -->
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.9</version>
</dependency>
<dependency><!--json字符简化操作-->
<groupId>com.</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
</dependency>
<dependency>
<groupId>com.dule</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
</dependency>
<!-- mvnrepository/artifact/com.microsoft.sqlserver/sqljdbc4 -->
<dependency><!--jdbc数据库连接-->
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
<!--开发者⼯具-->
<dependency><!--热部署⼯具-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency><!--前后端交互简化-->
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
<!-- mvnrepository/artifact/commons-codec/commons-codec -->
<!-- mvnrepository/artifact/commons-codec/commons-codec --> <!--<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.12</version>
</dependency>-->
<!-- mvnrepository/artifact/com.alibaba/fastjson -->
<dependency><!--简化Json操作-->
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.58</version>
</dependency>
<dependency><!--针对Excel相关操作-->
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>2.1.6</version>
</dependency>
<!-- hutool⼯具类 -->
<dependency><!--国产良⼼⼯具包(很⽅便)-->
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.4.3</version>
</dependency>
<dependency><!--IO⼯具库-->
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency><!--代码打包-->
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
</dependency>
<dependency><!--绘制图表-->
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.5.0</version>
</dependency>
<!-- mvnrepository/le.guava/guava -->
<dependency><!--简化集合等基础类型的创建-->
<groupId&le.guava</groupId>
<artifactId>guava</artifactId>
<version>28.0-jre</version>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。