基于javaweb+SpringBoot的招聘系统项目(java+SpringBoot+HTML+JSP+Maven+mysql)

项目介绍
SpringBoot招聘项目。主要功能说明: 管理员登录,简历管理,问答管理,职位管理,用户管理,职位申请进度更新,查看简历等功能。

用户角色包含以下功能:用户首页,登录注册,职位查看,职位详情,投递简历,查看我的申请,管理个人简历,附件简历管理等功能。

环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目

6.数据库:MySql 5.7版本;

技术栈

  1. 后端:SpringBoot

  2. 前端:HTML+CSS+JavaScript+jsp

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
  2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
    若为maven项目,导入成功后请执行maven clean;maven install命令,下载所需jar包;
  3. 将项目中datasource.properties配置文件中的数据库配置改为自己的配置
  4. 配置tomcat,然后运行项目,在浏览器中输入http://localhost:8080/ 登录
    管理员账号/密码:admin/123456
    用户账号/密码: matou/123456

基于javaweb+SpringBoot的招聘系统项目(java+SpringBoot+HTML+JSP+Maven+mysql)_第1张图片
基于javaweb+SpringBoot的招聘系统项目(java+SpringBoot+HTML+JSP+Maven+mysql)_第2张图片
基于javaweb+SpringBoot的招聘系统项目(java+SpringBoot+HTML+JSP+Maven+mysql)_第3张图片
基于javaweb+SpringBoot的招聘系统项目(java+SpringBoot+HTML+JSP+Maven+mysql)_第4张图片
基于javaweb+SpringBoot的招聘系统项目(java+SpringBoot+HTML+JSP+Maven+mysql)_第5张图片
基于javaweb+SpringBoot的招聘系统项目(java+SpringBoot+HTML+JSP+Maven+mysql)_第6张图片

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

        return;
    }
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        doGet(req, resp);
    }
}
简历管理控制层:
@MultipartConfig
public class ResumeController extends HttpServlet {
    private static int MAX_POST_SIZE = 1024*1024*100;
    @SneakyThrows
    @Override
            jsonObject.put("flag", "fail");
            jsonObject.put("user", null);
            jsonObject.put("msg", "usernameOrPasswordIsBank");//用户名密码不能为空
            resp.getWriter().print(jsonObject);
            return;
        }
        password = MyMD5Util.encrypt(password);
        System.out.println(password);
        BusinessUserVO businessUserVO = new BusinessUserVO();
        businessUserVO.setUsername(username);
        businessUserVO.setPassword(password);
        StudentUserVO studentUserVO = new StudentUserVO();
        studentUserVO.setUsername(username);
        studentUserVO.setPassword(password);
        String flag1 = null;
        String flag2 = null;
        try {
            flag1 = BusinessUserDao.selectUsername(businessUserVO);
                user.setUsername(username);
                user.setPassword(password);
                StudentUserDao.insert(user);
                jsonObject.put("code",2000);
                jsonObject.put("flag","success");//注册成功
                jsonObject.put("msg","register_success");
                jsonObject.put("user",user);
                resp.getWriter().print(jsonObject);
                return;
            }
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
    }
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doGet(req, resp);
    }
}
登录管理控制层:
            resp.getWriter().print(jsonObject);
        }
    }
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doGet(req, resp);
    }
}
用户注册控制层:
/**
 * 用户注册
 */
public class RegisterController extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String username = req.getParameter("username");
                jsonObject.put("user",user);
                resp.getWriter().print(jsonObject);
                return;
            }
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
    }
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doGet(req, resp);
    }
}
登录管理控制层:
public class LoginController extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        JSONObject jsonObject = new JSONObject();
        String username = req.getParameter("username");
        String password = req.getParameter("password");
        resp.setCharacterEncoding("UTF-8");
        HttpSession session = req.getSession();
        if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
            jsonObject.put("code", 2000);
            jsonObject.put("flag", "fail");
        studentUserVO.setUsername(username);
        studentUserVO.setPassword(password);
        String flag1 = null;
        String flag2 = null;
        try {
            flag1 = BusinessUserDao.selectUsername(businessUserVO);
            if ("ok".equals(flag1)) {//企业用户名存在
                BusinessUserDTO businessUserDTO = BusinessUserDao.select(businessUserVO);
                if (businessUserDTO != null) {
                    jsonObject.put("code", 2000);
                    jsonObject.put("flag", "success");//登录成功
                    jsonObject.put("user", businessUserDTO);
                    jsonObject.put("msg", "login_success");
                    session.setAttribute("businessUser",businessUserDTO);
                    resp.getWriter().print(jsonObject);
                    return;
                } else {
                    jsonObject.put("code", 2000);
                    jsonObject.put("flag", "fail");//登录失败
                    jsonObject.put("user", null);
                    jsonObject.put("msg", "passwordError");//密码错误
                    resp.getWriter().print(jsonObject);
                    return;
                jsonObject.put("flag","fail");//注册失败
                jsonObject.put("msg","usernameIsExist");//用户名已存在
                resp.getWriter().print(jsonObject);
                return;
            }else {
                StudentUser user = new StudentUser();
                user.setUsername(username);
                user.setPassword(password);
                StudentUserDao.insert(user);
                jsonObject.put("code",2000);
                jsonObject.put("flag","success");//注册成功
                jsonObject.put("msg","register_success");
                jsonObject.put("user",user);
                resp.getWriter().print(jsonObject);
                return;
            }
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
    }
            byte[] bt = new byte[1024];
            int length = 0;
            while((length=fis.read(bt))!=-1){
                out.write(bt,0,length);
            }
            out.close();
        }else if (operate.equals("findByRecruitInfoId")){
            String recruitInfoId = req.getParameter("recuitInfoId");
            System.out.println(recruitInfoId);
            List<Resume> byRecruitInfoID = ResumeDao.findByRecruitInfoID(Integer.parseInt(recruitInfoId));
            jsonObject.put("code",2000);
            jsonObject.put("msg","success");
            jsonObject.put("flag","success");
            jsonObject.put("data",byRecruitInfoID);
                if (insert == 1){
                    jsonObject.put("code",2000);
                    jsonObject.put("msg","add success");
                    jsonObject.put("flag","success");
                    jsonObject.put("data",resume);
                    resp.getWriter().print(jsonObject);
                }else {
                    jsonObject.put("code",2000);
                    jsonObject.put("msg","add fail");
                    jsonObject.put("flag","fail");
                    jsonObject.put("data",null);
                    resp.getWriter().print(jsonObject);
                }
            } catch (SQLException throwables) {
                throwables.printStackTrace();
                jsonObject.put("code",5000);
                jsonObject.put("msg","server error");
                jsonObject.put("flag","fail");
                jsonObject.put("data",null);
                resp.getWriter().print(jsonObject);
            }
        }else if (operate.equals("download")){//下载简历
            String file = req.getParameter("file"); //客户端传递的需要下载的文件名
            String recruitInfoId = req.getParameter("recruitInfoId");
            String applyPosition = req.getParameter("applyPosition");
            String phoneNum = req.getParameter("phoneNum");
            String email = req.getParameter("email");
            String attachmentResume = "文件名";
            Resume resume = new Resume(studentUsername, Integer.parseInt(recruitInfoId), studentName, applyPosition, phoneNum, email, attachmentResume);
            int insert = 0;
            try {
                insert = ResumeDao.insert(resume);
                if (insert == 1){
                    jsonObject.put("code",2000);
                    jsonObject.put("msg","add success");
                    jsonObject.put("flag","success");
                    jsonObject.put("data",resume);
                    resp.getWriter().print(jsonObject);
                }else {
            jsonObject.put("user", null);
            jsonObject.put("msg", "usernameOrPasswordIsBank");//用户名密码不能为空
            resp.getWriter().print(jsonObject);
            return;
        }
        password = MyMD5Util.encrypt(password);
        System.out.println(password);
        BusinessUserVO businessUserVO = new BusinessUserVO();
        businessUserVO.setUsername(username);
        businessUserVO.setPassword(password);
        StudentUserVO studentUserVO = new StudentUserVO();
        studentUserVO.setUsername(username);
        studentUserVO.setPassword(password);
        String flag1 = null;
        String flag2 = null;
        try {
            flag1 = BusinessUserDao.selectUsername(businessUserVO);
            if ("ok".equals(flag1)) {//企业用户名存在
                BusinessUserDTO businessUserDTO = BusinessUserDao.select(businessUserVO);
                if (businessUserDTO != null) {
                    jsonObject.put("code", 2000);
                    jsonObject.put("flag", "success");//登录成功
                    jsonObject.put("user", businessUserDTO);
                    jsonObject.put("msg", "login_success");
                    session.setAttribute("businessUser",businessUserDTO);
                    resp.getWriter().print(jsonObject);

你可能感兴趣的:(java,maven,spring,boot)