SSM-CRUD员工管理项目

本文档详细介绍了使用SSM(Spring、SpringMVC、Mybatis)框架构建员工管理项目的步骤,包括项目环境配置、数据库设计、环境搭建、配置文件编写、JSP页面制作及Tomcat服务器配置,最终实现页面展示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SSM-CRUD员工管理项目

一,项目环境

JDK-1.8

IDEA-2017

MySq-l5.7

Maven-3.5

Tomcat- 9.0

二,数据库设计

CREATE DATABASE `ssmstaff`;

USE `ssmstaff`;

DROP TABLE IF EXISTS `Staff`;

CREATE TABLE `Staff` (
`staffID` INT(10) NOT NULL AUTO_INCREMENT COMMENT '员工id',
`staffName` VARCHAR(100) NOT NULL COMMENT '员工名字',
`staffAge` INT(11) NOT NULL COMMENT '员工年龄',
`staffAddress` VARCHAR(200) NOT NULL COMMENT '员工地址',
KEY `staffID` (`staffID`)
) ENGINE=INNODB DEFAULT CHARSET=utf8

INSERT  INTO `Staff`(`staffID`,`staffName`,`staffAge`,`staffAddress`)VALUES 
(1,'张无忌',20,'上海'),
(2,'周芷若',18,'北京'),
(3,'赵敏',18,'香港');

三,基本环境搭建

3.1 新建一个maven项目
3.2 到pom.xml文件所需要的坐标

 <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.12</version>
      </dependency>

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

    <dependency>
      <groupId>c3p0</groupId>
      <artifactId>c3p0</artifactId>
      <version>0.9.1.2</version>
    </dependency>

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

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

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>5.0.2.RELEASE</version>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</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.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>1.8.6</version>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>5.0.2.RELEASE</version>
    </dependency>

3.3 资源过滤

<build>
<!--设置maven资源过滤-->
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
</build>

3.4 创建所需的文件夹在这里插入图片描述
每一个对应的内容为
controller---->StaffController:

package com.duan.controller;

import com.duan.domain.Staff;
import com.duan.service.staffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

//
@SuppressWarnings("all")
@Controller
@RequestMapping("/staff")
public class StaffController {

    @Autowired
    @Qualifier("staffServiceImpl")
    private staffService staffservice;

    @RequestMapping("/AllStaff")
    public String findAffStaff(Model model) {
        List<Staff> staffs = staffservice.queryAllStaff();
        model.addAttribute("staffs", staffs);
        return "AllStaff";
    }

    @RequestMapping("/toAddStaff")
    public String toAddStaff() {
        return "AddStaff";
    }

    @RequestMapping("/AddStaff")
    public String AddStaff(Staff staff) {
        staffservice.addStaff(staff);
        return "redirect:/staff/AllStaff";
    }

    //当点击修改按钮之后,跳转到修改的页面
    @RequestMapping("/toupdateStaff")
    public String toupdateStaff(int id, Model model){

        Staff staff = staffservice.queryStaffById(id);
        model.addAttribute("staff",staff);
        return "UpdateStaff";
    }

    //修改员工信息
    @RequestMapping("/UpdateStaff")
    public String UpdateStaff(Staff staff){
        int i = staffservice.updateStaff(staff);
        if (i>0){
            System.out.println("修改成功");
        }
        return "redirect:/staff/AllStaff";
    }


    //删除员工
    @RequestMapping("delStaff")
    public String delStaff(int id){
        staffservice.delStaffById(id);
        return "redirect:/staff/AllStaff";
    }

    //查询员工信息
    @RequestMapping("/queryStaff")
    public String queryStaff(String staffName,Model model){
        Staff staff = staffservice.queryAllStaffByName(staffName);
        List<Staff> list = new ArrayList<Staff>();
        list.add(staff);
        if (staff==null){
            staffservice.queryAllStaff();
            model.addAttribute("error","未查询到员工信息");
        }
        model.addAttribute("staffs",list);
        return "AllStaff";
    }
}

dao------->StaffMapper:

package com.duan.dao;

import com.duan.domain.Staff;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StaffMapper {

    //1.增加一个员工
    int addStaff(Staff staff);

    //2.删除一个员工
    int delStaffById(@Param("id") int id);

    //3.修改一个员工
    int updateStaff(Staff staff);

    //4.查询一个员工
    Staff queryStaffById(@Param("id") int id);

    //5.查询全部的员工
    List<Staff> queryAllStaff();

    Staff queryAllStaffByName(@Param("staffName") String staffName);
}

dao------>StaffMapper.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.duan.dao.StaffMapper">

    <!--1.增加一个员工-->
    <insert id="addStaff" parameterType="Staff">
        INSERT INTO ssmstaff.staff (staffName, staffAge, staffAddress) VALUES (#{staffName},#{staffAge},#{staffAddress});
    </insert>

    <!--2.删除一个员工-->
    <delete id="delStaffById" parameterType="Staff">
        DELETE FROM ssmstaff.staff WHERE staffID=#{id};
    </delete>

    <!--3.修改一名员工-->
    <update id="updateStaff" parameterType="Staff">
        UPDATE ssmstaff.staff
        SET staffName=#{staffName},staffAge=#{staffAge},staffAddress=#{staffAddress}
        WHERE staffID=#{staffID};
    </update>

    <!--4.根据id查询员工-->
    <select id="queryStaffById"  resultType="Staff">
        SELECT * FROM ssmstaff.staff WHERE staffID=#{id};
    </select>

    <!--5.查询全部的员工-->
    <select id="queryAllStaff" resultType="Staff">
        SELECT * FROM ssmstaff.staff;
    </select>

    <!--6.根据名字查询员工信息-->
    <select id="queryAllStaffByName" resultType="Staff">
        SELECT * FROM ssmstaff.staff WHERE staffName=#{staffName};
    </select>
</mapper>

domain—>Staff:

package com.duan.domain;

import java.io.Serializable;

//编写员工的实体类
public class Staff implements Serializable {

    private int staffID;
    private String staffName;
    private int staffAge;
    private String staffAddress;

    public Staff() {
    }

    public Staff(int staffID, String staffName, int staffAge, String staffAddress) {
        this.staffID = staffID;
        this.staffName = staffName;
        this.staffAge = staffAge;
        this.staffAddress = staffAddress;
    }

    public int getStaffID() {
        return staffID;
    }

    public void setStaffID(int staffID) {
        this.staffID = staffID;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    public int getStaffAge() {
        return staffAge;
    }

    public void setStaffAge(int staffAge) {
        this.staffAge = staffAge;
    }

    public String getStaffAddress() {
        return staffAddress;
    }

    public void setStaffAddress(String staffAddress) {
        this.staffAddress = staffAddress;
    }

    @Override
    public String toString() {
        return "Staff{" +
                "staffID=" + staffID +
                ", staffName='" + staffName + '\'' +
                ", staffAge=" + staffAge +
                ", staffAddress='" + staffAddress + '\'' +
                '}';
    }
}

service----->staffService:

package com.duan.service;

import com.duan.domain.Staff;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface staffService {

    //1.增加一个员工
    int addStaff(Staff staff);

    //2.删除一个员工
    int delStaffById(@Param("id") int id);

    //3.修改一个员工
    int updateStaff(Staff staff);

    //4.查询一个员工
    Staff queryStaffById(@Param("id") int id);

    //5.查询全部的员工
    List<Staff> queryAllStaff();

    Staff queryAllStaffByName(@Param("staffName") String staffName);
}

service----->staffServiceImpl:

package com.duan.service;

import com.duan.dao.StaffMapper;
import com.duan.domain.Staff;

import java.util.List;

public class staffServiceImpl implements staffService {

    //service调用dao层
    private StaffMapper staffMapper;

    public void setStaffMapper(StaffMapper staffMapper) {
        this.staffMapper = staffMapper;
    }

    @Override
    public int addStaff(Staff staff) {
        return staffMapper.addStaff(staff);
    }

    @Override
    public int delStaffById(int id) {
        return staffMapper.delStaffById(id);
    }

    @Override
    public int updateStaff(Staff staff) {
        return staffMapper.updateStaff(staff);
    }

    @Override
    public Staff queryStaffById(int id) {
        return staffMapper.queryStaffById(id);
    }

    @Override
    public List<Staff> queryAllStaff() {
        return staffMapper.queryAllStaff();
    }

    @Override
    public Staff queryAllStaffByName(String staffName) {
        return staffMapper.queryAllStaffByName(staffName);
    }
}

四,编写配置文件

在这里插入图片描述
applicationContext.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:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/cache
        http://www.springframework.org/schema/cache/spring-cache.xsd">


    <import resource="spring-mvc.xml"/>
    <import resource="spring-service.xml"/>
    <import resource="spring-dao.xml"/>

</beans>

jdbcConfig.properties:

# 如果Mysql8.0的话
#jdbc.driver=com.mysql.cj.jdbc.Driver
#jdbc.url=jdbc:mysql://localhost:3306/ssmstaff?serviceTimezone=UTC&useUnicode=true&characterEncoding=UTF-8

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql:///ssmstaff?useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=root

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>
    <!--1.配置实体类的别名-->
    <typeAliases>
        <package name="com.duan.domain"/>
    </typeAliases>

    <!--2.配置映射-->
    <mappers>
        <mapper class="com.duan.dao.StaffMapper"/>
    </mappers>
</configuration>

spring-dao.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:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"

       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/cache
        http://www.springframework.org/schema/cache/spring-cache.xsd">

    <!--1.关联数据库文件的配置-->
    <context:property-placeholder location="classpath:jdbcConfig.properties"/>

    <!--2.配置数据源-->
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <property name="driverClass" value="${jdbc.driver}"/>
        <property name="jdbcUrl" value="${jdbc.url}"/>
        <property name="user" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
    </bean>

    <!--3.配置sqlSessionFactory-->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="configLocation" value="classpath:mybatis-config.xml"/>
    </bean>

    <!--4.动态的实现Dao接口注入到Spring容器-->
    <bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
        <property name="basePackage" value="com.duan.dao"/>
    </bean>

</beans>

spring-mvc.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:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">
    <!--1.配置注解驱动-->
    <mvc:annotation-driven/>

    <!--2.配置静态资源过滤-->
    <mvc:default-servlet-handler/>

    <!--3.配置扫描包-->
    <context:component-scan base-package="com.duan.controller"/>

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

</beans>

spring-service.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:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"

       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx.xsd">

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

    <!--2.将事务类注入到ioc的容器-->
   <bean id="staffServiceImpl" class="com.duan.service.staffServiceImpl">
       <property name="staffMapper" ref="staffMapper"/>
   </bean>

    <!--3.声明事务配置-->
    <bean id="transactionManager"  class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource"/>
    </bean>

    <!--4.aop事务支持-->
    <tx:advice id="txAdvice" transaction-manager="transactionManager">
        <tx:attributes>
            <tx:method name="*" propagation="REQUIRED"/>
        </tx:attributes>
    </tx:advice>

    <!--5.aop事务切入-->
    <aop:config>
        <aop:pointcut id="txPointCut" expression="execution(* com.duan.dao.*.*(..))"/>
        <aop:advisor advice-ref="txAdvice" pointcut-ref="txPointCut"/>
    </aop:config>



</beans>

在这里插入图片描述

提醒:Hello.jsp没用到可以不写
web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
	http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
  <display-name>Archetype Created Web Application</display-name>

  <!--1.配置前端控制器-->
  <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:applicationContext.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>dispatcherServlet</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>

  <!--2.配置乱码过滤-->
  <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>
    <init-param>
      <param-name>forceEncoding</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>
<filter-mapping>
  <filter-name>CharacterEncodingFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

  <session-config>
    <session-timeout>15</session-timeout>
  </session-config>
</web-app>

五,编写jsp页面

index.jsp:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<body>
<h2>Hello </h2>

<a href="${pageContext.request.contextPath}/staff/AllStaff">查询全部的员工</a>
</body>
</html>

AllStaff.jsp:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>查询所有员工</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">

    <div class="row clearfix">

        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>展示全部员工</small>
                </h1>
            </div>
        </div>

        <div class="row">
            <div class="col-md-4 column">
                <a href="${pageContext.request.contextPath}/staff/toAddStaff" class="btn btn-primary"> 新增员工</a>
                <a href="${pageContext.request.contextPath}/staff/AllStaff" class="btn btn-primary"> 全部员工</a>
            </div>

            <div class="col-md-8 column">

                <form action="${pageContext.request.contextPath}/staff/queryStaff" method="post" style="float:right" class="form-inline">
                    <span style="color:red ;font-weight: bold ">${error}</span>
                    <input type="text"  name="staffName" class="form-control" placeholder="请输入员工的名称">
                    <input type="submit"  class="btn btn-primary" value="查询">
                </form>
            </div>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>员工编号</th>
                    <th>员工名称</th>
                    <th>员工年龄</th>
                    <th>员工地址</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="staff" items="${staffs}">
                    <tr>
                        <th>${staff.staffID}</th>
                        <th>${staff.staffName}</th>
                        <th>${staff.staffAge}</th>
                        <th>${staff.staffAddress}</th>
                        <td>
                            <a href="${pageContext.request.contextPath}/staff/toupdateStaff?id=${staff.staffID}">修改</a> |
                            &nbsp;
                            <a href="${pageContext.request.contextPath}/staff/delStaff?id=${staff.staffID}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>

            </table>
        </div>
    </div>

</div>
</body>
</html>

AddStaff.xml:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新增员工</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">

    <div class="row clearfix">

        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>新增员工</small>
                </h1>
            </div>
        </div>

        <form action="${pageContext.request.contextPath}/staff/AddStaff" method="post">
            <div class="form-group">
                <label>员工名称:</label>
                <input type="text"  name="staffName" class="form-control " required>
            </div>
            <div class="form-group">
                <label>员工年龄:</label>
                <input type="text"  name="staffAge" class="form-control" required>
            </div>
            <div class="form-group">
                <label>员工地址:</label>
                <input type="text" name="staffAddress" class="form-control" required>
            </div>
            <div class="form-group">
                <input type="submit"  class="form-control" value="提交">
            </div>

        </form>
    </div>


</div>
</body>
</html>

UpdateStaff:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改员工信息</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">

    <div class="row clearfix">

        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>修改员工信息</small>
                </h1>
            </div>
        </div>

        <form action="${pageContext.request.contextPath}/staff/UpdateStaff" method="post">

            <%--这要隐藏id--%>
            <input type="hidden" name="staffID"  value="${staff.staffID}" >
            <div class="form-group">
                <label>员工名称:</label>
                <input type="text"  name="staffName" value="${staff.staffName}" class="form-control " required>
            </div>
            <div class="form-group">
                <label>员工年龄:</label>
                <input type="text"  name="staffAge" value="${staff.staffAge}" class="form-control" required>
            </div>
            <div class="form-group">
                <label>员工地址:</label>
                <input type="text" name="staffAddress"  value="${staff.staffAddress}" class="form-control" required>
            </div>
            <div class="form-group">
                <input type="submit"  class="form-control" value="修改">
            </div>

        </form>
    </div>

</div>
</body>
</html>

六, 配置Tomcat

七, 页面展示

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值