基于javaweb的SSM+Maven服装出租租赁管理系统(java+ssm+html+bootstrap+jquery+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

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

功能说明

080023392402

090023392402

100023392402

110023392402

120023392402

140023392402

基于javaweb的SSM+Maven服装出租租赁管理系统(java+ssm+html+bootstrap+jquery+mysql)

项目介绍

本项目为后台管理系统; 管理员角色包含以下功能: 管理员登录,用户管理,公告管理,服装类型管理,服装信息管理,客户信息管理,服装出租管理,服装归还管理,查询租还记录,修改个人信息,修改密码等功能。

环境需要

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.数据库:MySql 5.7版本;

技术栈

  1. 后端:Spring SpringMVC MyBatis 2. 前端:JSP+bootstrap+jQuery

使用说明

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

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
	
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
typeService.deleteBatch(ids);

return R.ok();
}

}
package com.learn.utils;



/**
* IP地址
*
* @email sunlightcs@gmail.com
*/
public class IPUtils {
private static Logger logger = LoggerFactory.getLogger(IPUtils.class);

/**
* 获取IP地址
*
* 使用Nginx等反向代理软件, 则不能通过request.getRemoteAddr()获取IP地址
* 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址,X-Forwarded-For中第一个非unknown的有效IP字符串,则为真实IP地址
*/
public static String getIpAddr(HttpServletRequest request) {
String ip = null;
try {
ip = request.getHeader("x-forwarded-for");
if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (StringUtils.isEmpty(ip) || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
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
			response.setCharacterEncoding("utf-8");

if (ex instanceof RRException) {
r.put("code", ((RRException) ex).getCode());
r.put("msg", ((RRException) ex).getMessage());
}else if(ex instanceof DuplicateKeyException){
r = R.error("该数据已存在,请重新输入");
}else if(ex instanceof AuthorizationException){
r = R.error("没有权限,请联系管理员授权");
}else{
r = R.error();
}

//记录异常日志
logger.error(ex.getMessage(), ex);

String json = JSON.toJSONString(r);
response.getWriter().print(json);
} catch (Exception e) {
logger.error("RRExceptionHandler 异常处理失败", e);
}
return new ModelAndView();
}
}
package com.learn.controller;


/**
* 系统页面视图
*
* @email sunlightcs@gmail.com
*/
@Controller
public class SysPageController {

@RequestMapping("sys/{url}.html")
public String page(@PathVariable("url") String url){
return "sys/" + url + ".html";
}

@RequestMapping("admin/{url}.html")
public String generator(@PathVariable("url") String url){
return "admin/" + url + ".html";
}
}
package com.learn.utils;

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
		
return R.ok();
}

}
package com.learn.controller;





/**
* 通知公告
*
* @email sunlightcs@gmail.com
*/
@RestController
@RequestMapping("news")
public class NewsController extends AbstractController {
@Autowired
private NewsService newsService;

/**
* 列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params){



//查询列表数据
Query query = new Query(params);
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
     * 上传资讯内容的图片
*
* @param upload 图片
* @param response 响应
*/
@ResponseBody
@RequestMapping("ckEditorUpload")
public void uploadFile(MultipartFile upload, String CKEditorFuncNum, HttpServletRequest request, HttpServletResponse response) throws IOException {

response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
try {

String path = null;

if (upload != null && !upload.isEmpty()) {

String url = MultipartFileUtil.uploadFile("/cdn", upload, request);
path = url;
}


// 返回“图像”选项卡并显示图片
out.println("<script type=\"text/javascript\">");
out.println("window.parent.CKEDITOR.tools.callFunction(" + CKEditorFuncNum + ",'" + path + "','')");
out.println("</script>");

} catch (RuntimeException e) {
out.println("<script type=\"text/javascript\">");
out.println("window.parent.CKEDITOR.tools.callFunction(" + CKEditorFuncNum + ",'','" + e.getMessage() + "');");
out.println("</script>");
}
}


}
package com.learn.controller;


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


/**
* 客户信息
*
* @email sunlightcs@gmail.com
*/
@RestController
@RequestMapping("costumer")
public class CostumerController extends AbstractController {
@Autowired
private CostumerService costumerService;

/**
* 列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params){



//查询列表数据
Query query = new Query(params);

List<CostumerEntity> costumerList = costumerService.queryList(query);
int total = costumerService.queryTotal(query);

PageUtils pageUtil = new PageUtils(costumerList, total, query.getLimit(), query.getPage());

return R.ok().put("page", pageUtil);
}


/**
* 列表
*/
@RequestMapping("/list2")
public R list2(@RequestParam Map<String, Object> params){
Query query = new Query(params);
List<CostumerEntity> costumerList = costumerService.queryList(query);
return R.ok().put("list", costumerList );
}


/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){


项目链接:
https://javayms.github.io?id=121122532008200qa
https://javayms.pages.dev?id=121122532008200qa