首页 > 其他分享 >2024/11/22日工作总结

2024/11/22日工作总结

时间:2024-11-23 23:23:37浏览次数:7  
标签:11 String 22 void request 2024 application import public

完成java请假条管理系统:
实现web页面的增删改查操作;
项目结构如图:

mapper:

点击查看代码
package com.vivy.mapper;

import com.vivy.pojo.Application;

import java.util.List;

public interface ApplicationMapper {

    void add(Application application);

    Application selectByStudentId(String studentId);

    int update(Application application);

    void delete(int id);

    List<Application> selectByConditionSingle(Application application);

    List<Application> selectAll();
}

pojo:

点击查看代码
package com.vivy.pojo;

public class Application {
    int id;
    String studentId;
    String studentName;
    String sex;
    String grade;
    String college;
    String specialty;
    String studentClass;
    String reason;
    String studentDate;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getCollege() {
        return college;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    public String getSpecialty() {
        return specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    public String getStudentClass() {
        return studentClass;
    }

    public void setStudentClass(String studentClass) {
        this.studentClass = studentClass;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getStudentDate() {
        return studentDate;
    }

    public void setStudentDate(String studentDate) {
        this.studentDate = studentDate;
    }

    @Override
    public String toString() {
        return "Application{" +
                "id=" + id +
                ", studentId='" + studentId + '\'' +
                ", studentName='" + studentName + '\'' +
                ", sex='" + sex + '\'' +
                ", grade='" + grade + '\'' +
                ", college='" + college + '\'' +
                ", specialty='" + specialty + '\'' +
                ", studentClass='" + studentClass + '\'' +
                ", reason='" + reason + '\'' +
                ", studentDate='" + studentDate + '\'' +
                '}';
    }
}

service:

点击查看代码
package com.vivy.service;

import com.vivy.mapper.ApplicationMapper;
import com.vivy.pojo.Application;
import com.vivy.util.SqlSessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.List;

public class ApplicationService {
    SqlSessionFactory sqlSessionFactory = SqlSessionFactoryUtils.getSqlSessionFactory();

    public void add(Application application){

        SqlSession sqlSession = sqlSessionFactory.openSession();
        ApplicationMapper applicationMapper = sqlSession.getMapper(ApplicationMapper.class);

        applicationMapper.add(application);

        sqlSession.commit();
        sqlSession.close();
    }

    public Application selectByStudentId(String s){

        SqlSession sqlSession = sqlSessionFactory.openSession();
        ApplicationMapper applicationMapper = sqlSession.getMapper(ApplicationMapper.class);

        Application application = applicationMapper.selectByStudentId(s);

        sqlSession.close();
        return application;
    }
    public void update(Application application){

        SqlSession sqlSession = sqlSessionFactory.openSession();
        ApplicationMapper applicationMapper = sqlSession.getMapper(ApplicationMapper.class);

        applicationMapper.update(application);


        sqlSession.commit();
        sqlSession.close();
    }

    public void delete(int id){
        SqlSession sqlSession = sqlSessionFactory.openSession();
        ApplicationMapper applicationMapper = sqlSession.getMapper(ApplicationMapper.class);

        applicationMapper.delete(id);

        sqlSession.commit();
        sqlSession.close();
    }

    public List<Application> selectByConditionSingle(Application application){
        SqlSession sqlSession = sqlSessionFactory.openSession();
        ApplicationMapper applicationMapper = sqlSession.getMapper(ApplicationMapper.class);

        List<Application> applications = applicationMapper.selectByConditionSingle(application);

        sqlSession.close();
        return applications;
    }

    public List<Application> selectAll(){
        SqlSession sqlSession = sqlSessionFactory.openSession();
        ApplicationMapper applicationMapper = sqlSession.getMapper(ApplicationMapper.class);

        List<Application> applications = applicationMapper.selectAll();

        sqlSession.close();
        return applications;
    }
}

util:

点击查看代码
package com.vivy.util;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;

public class SqlSessionFactoryUtils {

    private static SqlSessionFactory sqlSessionFactory;

    static {
        //静态代码块会随着类的加载自动执行,且只执行一次

        try {
            String resource = "mybatis-config.xml";
            InputStream inputStream = Resources.getResourceAsStream(resource);
            sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    public static SqlSessionFactory getSqlSessionFactory(){
        return sqlSessionFactory;
    }
}

web:

点击查看代码
package com.vivy.web;

import com.vivy.pojo.Application;
import com.vivy.service.ApplicationService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/addServlet")
public class addServlet extends HttpServlet {
    private ApplicationService service = new ApplicationService();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        //# = new String(classId.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);

        String studentId = request.getParameter("studentId");
        String studentName = request.getParameter("studentName");
        String sex = request.getParameter("sex");
        String grade = request.getParameter("grade");
        String college = request.getParameter("college");
        String specialty = request.getParameter("specialty");
        String studentClass = request.getParameter("studentClass");
        String reason = request.getParameter("reason");
        String studentDate = request.getParameter("studentDate");

        Application application = new Application();

        application.setStudentId(studentId);
        application.setStudentName(studentName);
        application.setSex(sex);
        application.setGrade(grade);
        application.setCollege(college);
        application.setSpecialty(specialty);
        application.setStudentClass(studentClass);
        application.setReason(reason);
        application.setStudentDate(studentDate);

        service.add(application);

        request.getRequestDispatcher("/selectAllServlet").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}
点击查看代码
package com.vivy.web;

import com.vivy.service.ApplicationService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/deleteOneServlet")
public class deleteOneServlet extends HttpServlet {
    private ApplicationService service = new ApplicationService();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        //# = new String(classId.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);

        String id = request.getParameter("id");

        service.delete(Integer.parseInt(id));

        request.getRequestDispatcher("/selectAllServlet").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}
点击查看代码
package com.vivy.web;

import com.vivy.pojo.Application;
import com.vivy.service.ApplicationService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;

@WebServlet("/selectAllServlet")
public class selectAllServlet extends HttpServlet {
    private ApplicationService service = new ApplicationService();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        //# = new String(classId.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);

        List<Application> applications = service.selectAll();

        request.setAttribute("applications",applications);

        request.getRequestDispatcher("/printList.jsp").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}
点击查看代码
package com.vivy.web;

import com.vivy.pojo.Application;
import com.vivy.service.ApplicationService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;

@WebServlet("/selectByConditionSingleServlet")
public class selectByConditionSingleServlet extends HttpServlet {
    private ApplicationService service = new ApplicationService();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        //# = new String(classId.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);

        String id = request.getParameter("studentId");
        String reason = request.getParameter("reason");
        String studentDate = request.getParameter("studentDate");

        Application application = new Application();

        application.setStudentId(id);
        application.setReason(reason);
        application.setStudentDate(studentDate);

        List<Application> applications = service.selectByConditionSingle(application);

        request.setAttribute("applications",applications);

        request.getRequestDispatcher("/printList.jsp").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}
点击查看代码
package com.vivy.web;

import com.vivy.pojo.Application;
import com.vivy.service.ApplicationService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/selectByStudentIdServlet")
public class selectByStudentIdServlet extends HttpServlet {
    private ApplicationService service = new ApplicationService();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        //# = new String(classId.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);

        String s = request.getParameter("studentId");

        Application application = service.selectByStudentId(s);

        request.setAttribute("application",application);

        request.getRequestDispatcher("/update.jsp").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}
点击查看代码
package com.vivy.web;

import com.vivy.pojo.Application;
import com.vivy.service.ApplicationService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/selectToDelete")
public class selectToDelete extends HttpServlet {
    private ApplicationService service = new ApplicationService();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        //# = new String(classId.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);

        String id = request.getParameter("studentId");

        Application application = service.selectByStudentId(id);

        request.setAttribute("application",application);

        request.getRequestDispatcher("/deleteOne.jsp").forward(request,response);

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}
点击查看代码
package com.vivy.web;

import com.vivy.pojo.Application;
import com.vivy.service.ApplicationService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/updateServlet")
public class updateServlet extends HttpServlet {
    private ApplicationService service = new ApplicationService();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        //# = new String(classId.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);

        String id = request.getParameter("id");
        String reason = request.getParameter("reason");
        String studentDate = request.getParameter("studentDate");

        Application application = new Application();

        application.setId(Integer.parseInt(id));
        application.setReason(reason);
        application.setStudentDate(studentDate);

        service.update(application);

        request.getRequestDispatcher("/selectAllServlet").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}

ApplicationMapper.xml:

点击查看代码
<?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.vivy.mapper.ApplicationMapper">

    <resultMap id="applicationResultMap" type="Application">
        <result column="student_id" property="studentId"></result>
        <result column="student_name" property="studentName"></result>
        <result column="student_class" property="studentClass"></result>
        <result column="student_date" property="studentDate"></result>
    </resultMap>

    <insert id="add" useGeneratedKeys="true" keyProperty="id">
        insert into tb_application (student_id, student_name,sex, grade, college, specialty,student_class,reason,student_date)
        values (#{studentId}, #{studentName},#{sex}, #{grade}, #{college}, #{specialty},#{studentClass},#{reason},#{studentDate});
    </insert>

    <select id="selectByStudentId" resultType="com.vivy.pojo.Application" resultMap="applicationResultMap">
        select *
        from tb_application
        where student_id = #{studentId}
    </select>

    <select id="selectByConditionSingle" resultType="com.vivy.pojo.Application" resultMap="applicationResultMap">
        select *
        from tb_application
        <where>
            <choose>
                <when test="studentId != null and studentId != ''">
                    student_id = #{studentId}
                </when>
                <when test="reason != null and reason != '' ">
                    reason like #{reason}
                </when>
                <when test="studentDate != null and studentDate != '' ">
                    student_date like #{studentDate}
                </when>
            </choose>
        </where>
    </select>

    <select id="selectAll" resultType="com.vivy.pojo.Application" resultMap="applicationResultMap">
        select * from tb_application;
    </select>

    <update id="update">
        update tb_application
        <set>
            <if test="reason != null and reason != '' ">
                reason = #{reason},
            </if>
            <if test="studentDate != null and studentDate != '' ">
                student_date = #{studentDate},
            </if>
        </set>
        where id = #{id};
    </update>

    <delete id="delete">
        delete from tb_application where id = #{id}
    </delete>
</mapper>

mybatis-config.xml:

点击查看代码
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>

    <!--起别名,不区分大小写-->
    <typeAliases>
        <package name="com.vivy.pojo"/>
    </typeAliases>

    <environments default="development">

        <environment id="development">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.cj.jdbc.Driver"/>
                <property name="url" value="jdbc:mysql://localhost:3306/mybatis?useSSL=true&amp;serverTimezone=UTC"/>
                <property name="username" value="root"/>
                <property name="password" value="123456"/>
            </dataSource>
        </environment>

    </environments>
    <mappers>

        <!--加载sql映射文件-->
        <!--<mapper resource="com/itheima/mapper/UserMapper.xml"/>-->

        <!--Mapper 代理,扫描mapper-->
        <package name="com.vivy.mapper"/>

    </mappers>
</configuration>

webapp:

点击查看代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新增请假信息申请</title>
</head>
<body>
<h2>新增请假信息申请</h2>
<hr>
<form id="add-form" action="/application-demo/addServlet" method="post">
    学号:<input name="studentId" type="text" id="studentId" ><br>
    姓名:<input name="studentName" type="text" id="studentName" ><br>
    性别:<input name="sex" type="text" id="sex" ><br>
    年级:<input name="grade" type="text" id="grade" ><br>
    学院:<input name="college" type="text" id="college" ><br>
    专业:<input name="specialty" type="text" id="specialty" ><br>
    班级:<input name="studentClass" type="text" id="studentClass" ><br>
    事由:<input name="reason" type="text" id="reason" ><br>
    日期:<input name="studentDate" type="text" id="studentDate" ><br>

    <div class="buttons">
        <input value="新增申请" type="submit" id="add_btn">
    </div>
    <br class="clear">
</form>

</body>
</html>
点击查看代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>删除申请</title>
</head>
<body>
<h2>删除申请</h2>
<hr>
<form id="delete-form" action="/application-demo/selectToDelete" method="post">
    学号:<input name="studentId" type="text" id="studentId" required><br>

    <div class="buttons">
        <input value="提交删除" type="submit" id="delete1_btn">
    </div>
    <br class="clear">
</form>

</body>
</html>
点击查看代码
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>删除申请</title>
</head>
<body>
<h2>删除申请</h2>
<hr>
<form action="${pageContext.request.contextPath}/deleteOneServlet" method="post">

    <p>学号:${application.studentId}</p>
    <p>姓名:${application.studentName}</p>
    <p>性别:${application.sex}</p>
    <p>年级:${application.grade}</p>
    <p>学院:${application.college}</p>
    <p>专业:${application.specialty}</p>
    <p>班级:${application.studentClass}</p>
    <p>事由:${application.reason}</p>
    <p>日期:${application.studentDate}</p>

    <%--隐藏域,提交id--%>
    <input type="hidden" name="id" value="${application.id}">

    <div class="buttons">
        <input value="确认删除" type="submit" id="delete2_btn">
    </div>
    <br class="clear">
</form>

</body>
</html>
点击查看代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>请假条管理系统</title>
    <script>
        function add() {
            window.location.href = "add.html";
        }

        function modify() {
            window.location.href = "modify.html";
        }

        function deleteOne() {
            window.location.href = "deleteOne.html";
        }

        function search() {
            window.location.href = "search.html";
        }

    </script>
</head>
<body>
<h1>请假条管理系统</h1>
<hr>
<button onclick="add()">新增申请</button>
<button onclick="modify()">修改申请</button>
<button onclick="deleteOne()">删除申请</button>
<button onclick="search()">查询申请</button>
</body>
</html><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>请假条管理系统</title>
    <script>
        function add() {
            window.location.href = "add.html";
        }

        function modify() {
            window.location.href = "modify.html";
        }

        function deleteOne() {
            window.location.href = "deleteOne.html";
        }

        function search() {
            window.location.href = "search.html";
        }

    </script>
</head>
<body>
<h1>请假条管理系统</h1>
<hr>
<button onclick="add()">新增申请</button>
<button onclick="modify()">修改申请</button>
<button onclick="deleteOne()">删除申请</button>
<button onclick="search()">查询申请</button>
</body>
</html>
点击查看代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改申请</title>
</head>
<body>
<h2>修改申请</h2>
<hr>
<form id="modify-form" action="/application-demo/selectByStudentIdServlet" method="post">
    学号:<input name="studentId" type="text" id="studentId" required><br>
    <div class="buttons">
        <input value="提交修改" type="submit" id="modify_btn">
    </div>
    <br class="clear">
</form>

</body>
</html>
点击查看代码
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function Back() {
            window.location.href = "index.html";
        }
    </script>
</head>
<body>
<table border="1" cellspacing="0" width="80%">
    <tr>
        <th>序号</th>
        <th>学号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>年级</th>
        <th>学院</th>
        <th>专业</th>
        <th>班级</th>
        <th>事由</th>
        <th>日期</th>

    </tr>

    <c:forEach items="${applications}" var="application" varStatus="status">
        <tr align="center">
            <td>${status.count}</td>
            <td>${application.studentId}</td>
            <td>${application.studentName}</td>
            <td>${application.sex}</td>
            <td>${application.grade}</td>
            <td>${application.college}</td>
            <td>${application.specialty}</td>
            <td>${application.studentClass}</td>
            <td>${application.reason}</td>
            <td>${application.studentDate}</td>
        </tr>

    </c:forEach>
</table>

<button onclick="Back()">返回首页</button>

</body>
</html>
点击查看代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查询申请</title>
</head>
<body>
<h2>查询申请</h2>
<hr>
<form id="search-form" action="/application-demo/selectByConditionSingleServlet" method="post">
    学号:<input name="studentId" type="text" id="studentId" ><br>
    事由:<input name="reason" type="text" id="reason" ><br>
    日期:<input name="studentDate" type="text" id="studentDate" ><br>

    <div class="buttons">
        <input value="查询申请" type="submit" id="search_btn">
    </div>
    <br class="clear">
</form>

</body>
</html>
点击查看代码
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改申请</title>
</head>
<body>
<h2>修改申请</h2>
<hr>
<form action="${pageContext.request.contextPath}/updateServlet" method="post">
    <p>学号:${application.studentId}</p>
    <p>姓名:${application.studentName}</p>
    <p>性别:${application.sex}</p>
    <p>年级:${application.grade}</p>
    <p>学院:${application.college}</p>
    <p>专业:${application.specialty}</p>
    <p>班级:${application.studentClass}</p>

    <%--隐藏域,提交id--%>
    <input type="hidden" name="id" value="${application.id}">

    事由:<input name="reason" type="text" id="reason" value="${application.reason}"><br>
    日期:<input name="studentDate" type="text" id="studentDate" value="${application.studentDate}"><br>

    <div class="buttons">
        <input value="确认修改" type="submit" id="update_btn">
    </div>
    <br class="clear">
</form>

</body>
</html>

pom.xml:

点击查看代码
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.example</groupId>
  <artifactId>application-demo</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>

  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.6</version>
    </dependency>

    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.5.5</version>
    </dependency>

    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>8.0.28</version>
    </dependency>

    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.2</version>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <!-- tomcat 插件 -->
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
      </plugin>

    </plugins>
  </build>

</project>

标签:11,String,22,void,request,2024,application,import,public
From: https://www.cnblogs.com/zhanglijian/p/18565250

相关文章

  • 1123-最小栈
    最小栈leetcode155.题目大意:设计一个栈,要求在常数时间内检测到最小元素解题思路:设置一个存最小元素的栈,这样就可以同步更新最小值题解及注释:classMinStack{privateStack<Integer>stack;privateStack<Integer>minStack;//最小栈//初始化public......
  • 22207320-王攀-Blog2
    题目集4~6的总结性Blog一、前言经过题目集4至6的练习,我对Java编程的理解和实践能力都有了显著的提升。题目集4主要考察了继承与正则表达式的知识点,题目集5引入了家庭电路的模拟,题目集6则在前者的基础上增加了并联电路的处理。三次题目集的题量逐步增加,难度也有所提升,特别是题目......
  • 题解:AT_abc381_c [ABC381C] 11/22 Substring
    显然这个“11/22Substring”是以那个“/”为中心对称的。鉴于一个这样的字符串只能有一个“/”,而题目又要求最长,所以确定了“/”就能确定一个满足要求的子串。那思路就很简单了,只有两步:找到所有的“/”两边同时寻找相应的子串。别的,除了判断一下越界之外,就不用管了。......
  • 2024-2025-1 20241413 《计算机基础与程序设计》第九周学习总结
    班级链接https://edu.cnblogs.com/campus/besti/2024-2025-1-CFAP作业要求https://www.cnblogs.com/rocedu/p/9577842.html#WEEK09作业目标操作系统责任内存与进程管理分时系统CPU调度文件、文件系统文件保护磁盘调度教材学习内容总结《计算机科学概论》......
  • YOLOv10改进,YOLOv10添加DynamicConv(动态卷积),CVPR2024,二次创新C2f结构
    摘要大规模视觉预训练显著提高了大规模视觉模型的性能。现有的低FLOPs模型无法从大规模预训练中受益。在本文中,作者提出了一种新的设计原则,称为ParameterNet,旨在通过最小化FLOPs的增加来增加大规模视觉预训练模型中的参数数量。利用DynamicConv动态卷积将额外的参......
  • 【C++】C++11引入的新特性(1)
    生命有多长,不悲不喜。青春多荒凉,不骄不躁。假如生命止于明天,那么我们能必须珍惜今天。......
  • 新手必看:IntelliJ IDEA 2024 安装激活教程
    第一步前往idea的官网,下载新版的idea下载完成后,进行安装,next,安装完成首次打开,会要求输入激活码才能使用(博主使用的是2014.1.5版本)第二步点击获取补丁文件(含2014.1.5版本exe)保存下载之后进入文件夹***/JetBrains2023最新全家桶激活***找到文件/方式3:永久激活补丁......
  • 1123模拟赛
    \(T1\),注意点与边不同阶时分着开,别开小了。\(T2\)当dp数组由于太大开不下时,可以用记忆化搜索代替。最长不公共子序列:首先可推出\(f[i][j]=min(f[i-1][j],f[i][j-1])(a[i]==b[j]),f[i-1][j-1]+1(a[i]!=b[j])\),由于一段连续的\(a[i]!=b[j]\)可以一下全消掉,所以可以看一个\(a[i]......
  • 高级java每日一道面试题-2024年11月22日-JVM篇-说说堆和栈的区别?
    如果有遗漏,评论区告诉我进行补充面试官:说说堆和栈的区别?我回答:在Java高级面试中,关于堆和栈的区别是一个常见的问题。堆和栈是JVM(Java虚拟机)内存模型中的两个重要部分,它们在程序执行过程中扮演着不同的角色。下面是对堆和栈的详细解释:堆(Heap)定义:堆是JVM中最......
  • 高级java每日一道面试题-2024年11月21日-数据结构篇-红黑树有哪几个特征?
    如果有遗漏,评论区告诉我进行补充面试官:红黑树有哪几个特征?我回答:红黑树(Red-BlackTree)是一种自平衡二叉查找树(Self-BalancingBinarySearchTree),它在插入和删除操作后能够自动保持树的高度平衡。红黑树在许多实际应用中都非常有用,例如在Java的TreeMap和TreeSe......