ssm图书管理系统

项目展示

一、项目概述

图书管理系统是一个旨在简化图书馆或书店图书管理流程的数据库管理系统。该系统通过提供一个直观且功能丰富的用户界面,使得图书管理员能够轻松地进行图书信息的录入、查询、编辑、删除以及借阅状态的管理。

二、系统界面

系统界面设计简洁明了,采用了浅色背景和深色文字来突出重要的信息。界面上方设有一个蓝色的导航栏,包含了多个选项卡,如“返回管理”、“数据查询”、“商品信息”(在此上下文中,商品即指图书)、“状态”和“删除”。这些选项卡为用户提供了快速访问不同管理功能的途径。

在选项卡下方,系统展示了一个或多个表格,用于列出图书的详细信息。每个表格都包含了不同的项目列,如“书名”、“作者”、“价格”、“类别”以及“操作”等。其中,“操作”列通常包含编辑和删除等功能的链接或按钮。

特别地,系统还在某些列(如“状态”列)旁边添加了红色或绿色的圆圈标记,以直观地表示图书的借阅状态或其他条件。例如,一个绿色的圆圈可能表示图书处于“未借出”状态,而一个红色的圆圈则可能表示图书已被“已借出”。

三、系统功能

  1. 图书信息录入:管理员可以通过新建课程(在此上下文中,应理解为新建图书信息)功能,轻松地将新图书的信息录入系统。

  2. 图书信息查询:系统提供了数据查询功能,允许管理员根据书名、作者等关键词快速查找图书信息。

  3. 图书信息编辑:管理员可以编辑已存在的图书信息,如更新价格、修改类别等。

  4. 图书信息删除:对于不再需要的图书信息,管理员可以选择批量删除或单个删除。

  5. 借阅状态管理:系统允许管理员更新图书的借阅状态,如将图书标记为已借出或未借出。

四、技术亮点

  1. 用户友好的界面设计:系统界面简洁明了,易于使用。

  2. 高效的数据管理:系统通过数据库技术实现了图书信息的快速存储和检索。

  3. 灵活的操作功能:系统提供了丰富的操作功能,满足管理员的不同需求。

  4. 可扩展性:系统具有良好的可扩展性,可以根据实际需求添加新的功能或模块。

项目代码

前端,首界面

<template>
  <div>
    <el-container>
      <el-header>图书管理系统</el-header>
      <el-container>
        <el-aside width="200px">
          <el-menu
              default-active="2"
              class="el-menu-vertical-demo"
              background-color="#545c64"
              text-color="#fff"
              active-text-color="#ffd04b"
              router>
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>后台管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/kecheng">图书管理</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>

</template>

<style>
.container{
  height: 750px;
}

.el-header{
  background-color: #B3C0D1;
  color: #333;
  text-align: left;
  line-height: 60px;
}

.el-footer {
  background-color: #B3C0D1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #E9EEF3;
  color: #333;
  text-align: center;
}

</style>

<script>
export default {
  name: "zhu"
}
</script>

前端,图书页

<script>
var arr = "";
export default {
  name: "kecheng",
  created() {
    this.shuxin()
  },
  data() {
    return {
      tableData: [],
      newFormData: {
        bookname:"",
        author:"",
        price:"",
        type:"",
        tai:""
      },
      multipleSelection: [],
      currentPage:1,
      total1: 10,
      formInline: {
        bookname: "",
        region: ""
      },
      pagesize:5,
      dialogVisible:false,
      dialogVisible1:false,
    }
  },
  methods:{
    handleSelectionChange(val) {
      this.multipleSelection = val;
      arr = [];
      for (let i = 0; i < val.length; i++) {
        arr[i] = val[i].bookname;
      }
    },
    handleEdit(row) {
      this.dialogVisible1=true;
      this.newFormData.bookname = row.bookname;
      this.newFormData = {...row};
    },
    handleDelete(row) {
      console.log(row);
      var that = this;
      that.$axios({
        url: "http://localhost:8080/deletebook",
        method: "post",
        params: {
          bookname: row.bookname,
          author: row.author
        }
      }).then(function (resp) {
        console.log(resp);
        that.shuxin()
      },function (error) {
        console.log("错误"+error);
      })
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
      this.pagesize = val;
      this.shuxin(this.currentPage,val);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.currentPage = val;
      this.shuxin(val,this.pagesize);
    },
    shuxin(){
      var that=this;
      that.$axios({
        url:"http://localhost:8080/fenye",
        method:"post",
        params:{
          page:that.currentPage,
          size:that.pagesize,
        }
      }).then(function(res){
        console.log(res);
        that.tableData = res.data.list;
        that.total1 = res.data.total;
      },function(error){
        console.log(error);
      })
    },
    onSubmit() {
      var that = this;
      that.$axios({
        url: "http://localhost:8080/select",
        method: "post",
        params: {
          bookname: that.formInline.bookname,
          tai: that.formInline.region,
        }
      }).then(function (resp) {
        console.log(resp)
        that.tableData = resp.data;
      },function (error) {
        console.log("错误"+error);
      })
    },
    xinjian(){
      this.dialogVisible=true;
    },
    addNewProduct(){
      var that = this;
      that.$axios({
        url: "http://localhost:8080/insertbook",
        method: "post",
        data: {
          "bookname" : this.newFormData.bookname,
          "author" : this.newFormData.author,
          "price" : this.newFormData.price,
          "type" : this.newFormData.type,
          "tai" : this.newFormData.tai
        }
      }).then(function (resp) {
        console.log(resp)
        that.dialogVisible=false;
        that.shuxin()
      },function (error) {
        console.log("错误"+error);
      })
    },
    updateNewProduct(){
      var that = this;
      that.$axios({
        url: "http://localhost:8080/update",
        method: "post",
        data: {
          "bookname" : that.newFormData.bookname,
          "author" : this.newFormData.author,
          "price" : this.newFormData.price,
          "type" : this.newFormData.type,
          "tai" : this.newFormData.tai
        }
      }).then(function (resp) {
        console.log(resp)
        that.dialogVisible1=false;
        that.shuxin()
      },function (error) {
        console.log("错误"+error);
      })
    },
    piliang(){
      var that = this;
      let arrs = arr.join(",")
      let url = `http://localhost:8080/piliang?bookname=${encodeURIComponent(arrs)}`;
      that.$axios({
        url:url,
        method:"post"
      }).then(function (resp) {
        console.log(resp)
        that.shuxin()
      },function (error) {
        console.log(error);
      })
    },
    updatectatus(row){
      var that = this;
      that.$axios({
        url:"http://localhost:8080/updatetai",
        method:"post",
        params:{
          bookname:row.bookname,
          author:row.author,
          tai:row.tai
        }
      }).then(function (resp) {
        that.shuxin();
      }, function (error) {
        console.log("错误"+error)
      })
    },
  }
}
</script>

<template>
  <div>

    <el-form :inline="true" :model="formInline">
      <el-form-item label="课程名称">
        <el-input v-model="formInline.bookname" placeholder="商品名"></el-input>
      </el-form-item>
      <el-form-item label="状态">
        <el-select v-model="formInline.region" placeholder="-请选择-">
          <el-option label="未借出" value="未借出"></el-option>
          <el-option label="已借出" value="已借出"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
        <el-button type="primary" @click="piliang">批量删除</el-button>
      </el-form-item>
      <el-form-item>
        <el-button style="margin-left: 100%" type="primary" @click="xinjian">新建图书</el-button>
      </el-form-item>
    </el-form>

    <el-table
        ref="multipleTable"
        :data="tableData"
        tooltip-effect="dark"
        style="width: 100%"
        @selection-change="handleSelectionChange">
      <el-table-column
          type="selection"
          width="80">
      </el-table-column>
      <el-table-column
          prop="bookname"
          label="书名"
          width="100">
      </el-table-column>
      <el-table-column
          prop="author"
          label="作者"
          width="100">
      </el-table-column>
      <el-table-column
          prop="price"
          label="价格"
          width="100">
      </el-table-column>
      <el-table-column
          prop="type"
          label="类别"
          width="100">
      </el-table-column>
      <el-table-column
          prop="tai"
          label="状态"
          width="100">
        <template slot-scope="scope">
          <el-button  size="mini" :type="scope.row.tai === '未借出' ? 'success' : 'warning'"
                      circle></el-button>
        </template>
      </el-table-column>
      <el-table-column
          fixed="right"
          label="操作"
          width="300">
        <template slot-scope="scope">
          <el-button size="small" :type="scope.row.tai === '未借出' ? 'danger' : 'success' "
                     @click="updatectatus(scope.row)">
            {{ scope.row.tai === '未借出' ? "已借出" : "未借出" }}
          </el-button>
          <el-button
              size="mini"
              @click="handleEdit(scope.row)">编辑</el-button>
          <el-button
              size="mini"
              type="danger"
              @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-sizes="[5,10,15,20]"
        :page-size=pagesize
        layout="total, sizes, prev, pager, next, jumper"
        :total=total1>
    </el-pagination>

    <el-dialog title="新建图书" :visible.sync="dialogVisible" width="30%">
      <el-form :model="newFormData">
        <el-form-item label="图书名称">
          <el-input v-model="newFormData.bookname" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="作者">
          <el-input v-model="newFormData.author" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="价格">
          <el-input v-model="newFormData.price" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="类型">
          <el-input v-model="newFormData.type" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="状态">
          <el-input v-model="newFormData.tai" autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取消</el-button>
    <el-button type="primary" @click="addNewProduct">确 定</el-button>
    </span>
    </el-dialog>

    <el-dialog title="编辑图书" :visible.sync="dialogVisible1" width="30%">
      <el-form :model="newFormData">
        <el-form-item label="图书名称">
          <el-input v-model="newFormData.bookname" autocomplete="off" disabled></el-input>
        </el-form-item>
        <el-form-item label="作者">
          <el-input v-model="newFormData.author" autocomplete="off" disabled></el-input>
        </el-form-item>
        <el-form-item label="价格">
          <el-input v-model="newFormData.price" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="类型">
          <el-input v-model="newFormData.type" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="状态">
          <el-input v-model="newFormData.tai" autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible1 = false">取消</el-button>
    <el-button type="primary" @click="updateNewProduct">确 定</el-button>
    </span>
    </el-dialog>
  </div>
</template>

<style>

</style>

后端,controller层

package com.easthome.controller;

import com.alibaba.fastjson.JSON;
import com.easthome.pojo.Book;
import com.easthome.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

@RestController
@RequestMapping(produces = "text/plain;charset=utf-8")
public class BookController {

    @Autowired
    private BookService bookService;

    @GetMapping("/findAll")
    public String selectAll(){
        return JSON.toJSONString(bookService.selectAll());
    }

    @PostMapping("/select")
    public String select(String bookname, String tai){
        return JSON.toJSONString(bookService.select(bookname,tai));
    }

    @PostMapping("/updatetai")
    public String updatetai(String bookname, String author,String tai){
        return JSON.toJSONString(bookService.updatetai(bookname,author,tai));
    }

    @PostMapping("/deletebook")
    public String deletebook(String bookname,String author){
        return JSON.toJSONString(bookService.deletebook(bookname,author));
    }

    @PostMapping("/insertbook")
    public String insertbook(@RequestBody Book book){
        return JSON.toJSONString(bookService.insertbook(book));
    }

    @PostMapping("/selectmo")
    public String selectmo(String bookname,String author){
        return JSON.toJSONString(bookService.selectmo(bookname,author));
    }

    @PostMapping("/fenye")
    public String fenye(@RequestParam(value = "page", defaultValue = "1") int page,
                                @RequestParam(value = "size", defaultValue = "2") int size){
        return JSON.toJSONString(bookService.selectfenye(page,size));
    }

    @PostMapping("/update")
    public String update(@RequestBody Book book){
        return JSON.toJSONString(bookService.update(book));
    }

    @PostMapping("/piliang")
    public String piliang(@RequestParam String bookname) {
        List<String> list = Arrays.asList(bookname.split(","));
        return JSON.toJSONString(bookService.piliang(list));
    }
}

 后端,service层

package com.easthome.service.imp;

import com.easthome.mapper.BookMapper;
import com.easthome.pojo.Book;
import com.easthome.service.BookService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Objects;

@Service
@Transactional
public class BookServiceImp implements BookService {

    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> selectAll() {
        return bookMapper.selectAll();
    }

    @Override
    public List<Book> select(String bookname,String tai) {
        if (Objects.equals(bookname, "")){
            return bookMapper.selectbytai(tai);
        }
        if (Objects.equals(tai, "")){
            return bookMapper.selectbyname(bookname);
        }
        return bookMapper.selectnametai(bookname,tai);
    }

    @Override
    public Integer updatetai(String bookname,String author,String tai){
        if (tai.equals("未借出")){
            return bookMapper.updatetai(bookname,author);
        }else {
            return bookMapper.updatetai1(bookname,author);
        }
    }

    @Override
    public Integer deletebook(String bookname, String author) {
        return bookMapper.deletebook(bookname,author);
    }

    @Override
    public Integer insertbook(Book book) {
        return bookMapper.insertbook(book);
    }

    public List<Book> selectmo(String bookname,String author) {
        if (Objects.equals(bookname, "")){
            return bookMapper.selectmobyauthor(author);
        }
        if (Objects.equals(author, "")){
            return bookMapper.selectmobyname(bookname);
        }
        return bookMapper.selectmonameauthor(bookname,author);
    }

    @Override
    public PageInfo<Book> selectfenye(int page,int size) {
        PageHelper.startPage(page, size);
        List<Book> products = bookMapper.selectAll();
        PageInfo<Book> objectPageInfo = new PageInfo<>(products);
        return objectPageInfo;
    }

    @Override
    public int update(Book book) {
        return bookMapper.update(book);
    }

    @Override
    public int piliang(List<String> list) {
        return bookMapper.piliang(list);
    }
}

后端,mapper层

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.easthome.mapper.BookMapper">

     <select id="selectAll" resultType="book">
         select * from book
     </select>

    <select id="selectbyname" resultType="book">
        select * from book where bookname = #{bookname}
    </select>

    <select id="selectbytai" resultType="book">
        select * from book where tai = #{tai}
    </select>

    <select id="selectnametai" resultType="book" parameterType="string">
        select * from book where bookname = #{bookname} and tai = #{tai}
    </select>

    <update id="updatetai" parameterType="string">
        update book set tai = "已借出" where bookname = #{bookname} and author = #{author}
    </update>

    <update id="updatetai1" parameterType="string">
        update book set tai = "未借出" where bookname = #{bookname} and author = #{author}
    </update>

    <delete id="deletebook" parameterType="string">
        delete from book where bookname = #{bookname} and author = #{author}
    </delete>

    <insert id="insertbook" parameterType="book">
        insert into book values (#{book.bookname},#{book.author},#{book.price},#{book.type},#{book.tai})
    </insert>

    <select id="selectmobyname" resultType="book">
        select * from book where bookname like #{bookname}
    </select>

    <select id="selectmobyauthor" resultType="book">
        select * from book where author like #{author}
    </select>

    <select id="selectmonameauthor" resultType="book" parameterType="string">
        select * from book where bookname like #{bookname} and author like #{author}
    </select>

    <update id="update" parameterType="book">
        update book set tai = #{book.tai} , price = #{book.price} , type = #{book.type} where bookname = #{book.bookname} and author = #{book.author}
    </update>

    <delete id="piliang" parameterType="list">
        delete from book
        <where>
            <foreach collection="collection" separator="," open="bookname in(" close=")" item="bookname">
                #{bookname}
            </foreach>
        </where>
    </delete>
</mapper>

spring.xml 配置文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd">

    <!-- 扫描 -->
    <context:component-scan base-package="com.easthome.service"/>

    <!-- 引入druild配置文件 -->
    <context:property-placeholder location="classpath:druid.properties"/>

    <!-- 配置druild -->
    <bean id="druidDataSource" class="com.alibaba.druid.pool.DruidDataSource">
        <property name="driverClassName" value="${jdbc.driver}"/>
        <property name="url" value="${jdbc.url}"/>
        <property name="username" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
    </bean>

    <!--配置事务管理器的注解-->
    <tx:annotation-driven/>

    <!--事务管理器-->
    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="druidDataSource"/>
    </bean>

    <!-- mybatis整合 -->
    <!-- SqlSessionFactory -->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <!--数据库环境配置-->
        <property name="dataSource" ref="druidDataSource"/>
        <!--类型别名配置-->
        <property name="typeAliasesPackage" value="com.easthome.pojo"/>
        <!--如果要引入mybatis主配置文件,可以通过如下配置-->
        <!--<property name="configLocation" value="classpath:SqlMapConfig.xml"/>-->
        <property name="plugins">
            <array>
                <bean class="com.github.pagehelper.PageHelper">
                    <property name="properties">
                        <value>dialect=mysql</value>
                    </property>
                </bean>
            </array>
        </property>
    </bean>

    <!--映射接口扫描配置,由spring创建代理对象,交给IOC容器-->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.easthome.mapper"/>
    </bean>

</beans>

springmvc.xml 配置文件

<beans
        xmlns="http://www.springframework.org/schema/beans"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd">

    <!--配置注解扫描-->
    <context:component-scan base-package="com.easthome.controller"/>

    <!--配置视图解析器-->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/"></property>
        <property name="suffix" value=".jsp"></property>
    </bean>

    <!--实现静态资源映射-->
    <mvc:default-servlet-handler/>

    <!--mvc注解增强-->
    <mvc:annotation-driven/>

    <!--文件上传解析器-->
    <bean id="multipartResolver"
          class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
        <!-- 设定文件上传的最大值为5MB,5*1024*1024 -->
        <property name="maxUploadSize" value="5242880"></property>
        <!-- 设定文件上传时写入内存的最大值,如果小于这个参数不会生成临时文件,默认为10240 -->
        <property name="maxInMemorySize" value="40960"></property>
    </bean>

</beans>

web.xml 配置文件

<?xml version="1.0" encoding="UTF-8"?>
<web-app
        version="4.0"
        xmlns="http://xmlns.jcp.org/xml/ns/javaee"
        xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
        xmlns:xml="http://www.w3.org/XML/1998/namespace"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">

  <!--spring 与 web容器整合-->
  <listener>
    <listener-class>
      org.springframework.web.context.ContextLoaderListener
    </listener-class>
  </listener>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:spring.xml</param-value>
  </context-param>

  <!--中文乱码-->
  <filter>
    <filter-name>CharacterEncodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>CharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <!--前端控制器-->
  <servlet>
    <servlet-name>dispatcherServlet</servlet-name>
    <servlet-class>
      org.springframework.web.servlet.DispatcherServlet
    </servlet-class>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:springmvc.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>dispatcherServlet</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>
  
  <!-- 解决跨域 -->
  <filter>
    <filter-name>corsFilter</filter-name>
    <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>corsFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

</web-app>

mven依赖

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>12</maven.compiler.source>
    <maven.compiler.target>12</maven.compiler.target>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
    </dependency>

    <!-- mybatis -->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.5.6</version>
    </dependency>

    <!-- 整合mybatis -->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-spring</artifactId>
      <version>1.3.1</version>
    </dependency>

    <!-- 数据库 -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>8.0.28</version>
    </dependency>
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>druid</artifactId>
      <version>1.2.23</version>
    </dependency>

    <!-- spring -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>5.3.20</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>5.3.20</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>5.3.20</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>5.3.20</version>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>1.9.22.1</version>
    </dependency>

    <!-- springMVC -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>5.3.20</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>4.0.1</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.2</version>
    </dependency>
    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>5.3.20</version>
    </dependency>

    <!-- 小辣椒 -->
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.30</version>
    </dependency>

    <!-- 分页助手 -->
    <dependency>
      <groupId>com.github.pagehelper</groupId>
      <artifactId>pagehelper</artifactId>
      <version>3.7.5</version>
    </dependency>
    <dependency>
      <groupId>com.github.jsqlparser</groupId>
      <artifactId>jsqlparser</artifactId>
      <version>0.9.1</version>
    </dependency>

    <!-- mybatis 看sql的日志文件 -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
    </dependency>

    <!-- 后端传数据转成json格式 -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.13.4.1</version>
    </dependency>

    <!-- 手动解析Jason文件 -->
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>fastjson</artifactId>
      <version>2.0.0</version>
    </dependency>

    <!-- 文件上传 -->
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.5</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.16.1</version>
    </dependency>

    <!--解决跨域-->
    <dependency>
      <groupId>com.thetransactioncompany</groupId>
      <artifactId>cors-filter</artifactId>
      <version>2.5</version>
    </dependency>
  </dependencies>

log4j.porpertise
 


log4j.rootLogger=DEBUG,console,file

log4j.appender.console = org.apache.log4j.ConsoleAppender
log4j.appender.console.Target = System.out
log4j.appender.console.Threshold=DEBUG
log4j.appender.console.layout = org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%c]-%m%n

log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.File=./log/program.log
log4j.appender.file.MaxFileSize=10mb
log4j.appender.file.Threshold=DEBUG
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%p][%d{yy-MM-dd}][%c]%m%n

log4j.logger.org.mybatis=DEBUG
log4j.logger.java.sql=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.ResultSet=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值