• 【JAVA程序设计】(C00089)基于SSM(非maven)的仓库出入库管理系统


    项目简介

    基于SSM(非maven)的仓库出入库管理系统;
    功能简单,适合学习以及大作业等,jsp页面,form表单提交数据
    分为二种用户:管理员和超级管理员
    超级管理员功能:登录,管理员管理,货物管理(增删改查)
    管理员功能:登录注册,货物管理(增删改查)
    使用MVC设计模式开发

    项目获取

    源码获取地址

    开发环境

    运行环境:推荐jdk1.8;
    开发工具:eclipse以及idea(推荐);
    操作系统:windows 10 8G内存以上(其他windows以及macOS支持,但不推荐);
    浏览器:Firefox(推荐)、Google Chrome(推荐)、Edge;
    数据库:MySQL8.0(推荐)及其他版本(支持,但容易异常尤其MySQL5.7(不含)以下版本);
    数据库可视化工具:Navicat Premium 15(推荐)以及其他Navicat版本
    是否maven项目:否

    项目技术

    后端:mysql、Spring、SpringMVC、Mybatis
    前端:jsp

    相关代码

    • login.jsp
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title heretitle>
    head>
    <style>
    	body{
    		background-image: url(/images/bg.png);
    		background-repeat: no-repeat;
    		background-size: cover;
    	}
    
    style>
    <body style="text-align: center;margin-top:200px;">
    	<form action="/user/login" method="post">
    		欢迎使用仓库管理系统
    		${msg}
    		<table style="margin: auto">
    			<tr>
    				<td>用户名td>
    				<td><input name="username" type="text" >td>
    			tr>
    			<tr>
    				<td>密码td>
    				<td><input name="password" type="text" >td>
    			tr>
    			<tr>
    				<td>角色td>
    				<td>
    					<input name="type" type="radio" value="0">超级管理员
    					<input name="type" type="radio" value="1">管理员
    				td>
    			tr>
    		table>
    		<td>
    		<input type="submit" value="登录">
    		td>	
    	form>
    	<a href="/user/toAdd">无账号?去注册a>
    body>
    
    html>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • UserController.java
    package ssm.controller;
    
    import ssm.entity.User;
    import org.springframework.stereotype.Controller;
    import org.springframework.web.bind.annotation.RequestMapping;
    import ssm.service.UserService;
    
    import javax.annotation.Resource;
    import javax.servlet.http.HttpServletRequest;
    import java.util.List;
    
    @Controller
    @RequestMapping("user")
    public class UserController {
        @Resource
        private UserService userService;
    
        @RequestMapping("login")
        public String login(HttpServletRequest request, User user){
            String msg = userService.login(user,request);
            if(!msg.equals("success")){
                request.setAttribute("msg",msg);
                return "login";
            }else{
                return "index";
            }
        }
    
        @RequestMapping("getList")
        public String getList(HttpServletRequest request){
            List<User> list = userService.getList();
            request.setAttribute("list",list);
            return "userList";
        }
    
        @RequestMapping("delete")
        public String delete(Integer id,HttpServletRequest request){
            userService.deleteByPrimaryKey(id);
            return getList(request);
        }
    
        @RequestMapping("insert")
        public String insert(User user,HttpServletRequest request){
            user.setType(1);
            userService.insert(user);
            return "login";
        }
    
        @RequestMapping("toAdd")
        public String toAdd(){
            return "addUser";
        }
    
        @RequestMapping("logout")
        public String logout(HttpServletRequest request){
            request.getSession().removeAttribute("user");
            return "login";
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • applicationContext.xml
    
    <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"
           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">
        
        <context:property-placeholder location="classpath:config/db.properties"/>
        
        <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>
        
      	
    	<bean id="sqlSessionFactory" 
    	      class="org.mybatis.spring.SqlSessionFactoryBean">
    		<property name="dataSource" ref="dataSource" />
    		<property name="configLocation" 
    		          value="classpath:config/mybatis-config.xml"/>
    	bean>	
    	
    	
        <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
            
            <property name="basePackage" value="ssm.mapper" />
        bean>	
    	<context:component-scan base-package="ssm.service"/>
    beans>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33

    运行截图

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    运行视频

    【运行视频】(C00089)基于SSM(非maven)的仓库出入库管理系统

  • 相关阅读:
    Java基础进阶集合-Collection接口
    SpringBoot--中间件技术-3:整合mongodb,整合ElasticSearch,附案例含代码(简单易懂)
    Docker
    Server Name Indication(SNI),HTTP/TLS握手过程解析
    uniapp v3+ts 使用 u-upload上传图片以及视频
    三十分钟学会Hive
    与归并排序相关的一些问题
    Redis如何实现多可用区?
    模型 金字塔原理
    【Python 实战基础】Pandas如何从股票数据找出收盘价最低行
  • 原文地址:https://blog.csdn.net/mataodehtml/article/details/127768321