——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Node.js≥14
开发工具 后端:eclipse/idea/myeclipse/sts等均可配置运行 前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot阿博图书馆管理系统(java+springboot+maven+mybaits+vue+elementui+mysql)
项目介绍
基于Springboot+vue阿博图书馆管理系统
技术栈
后端:SpringBoot+Mybaits
前端:Vue + elementui
使用说明
项目运行:
使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
将项目中application.yml配置文件中的数据库配置改为自己的配置;
运行项目,在浏览器中输入地址:
前台地址:http://localhost:8080/springboot33dng/front/index.html
后台地址
http://localhost:8080/springboot33dng/admin/dist/index.html
后台管理员: admin 123456
前台用户: 用户1 123456 用户2 123456 用户3 123456 用户4 123456 用户5 123456 用户6 123456
注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。
——————————CodeStart——————————
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 @IgnoreAuth @RequestMapping("/detail/{id}") public R detail (@PathVariable("id") Long id) { TushuxinxiEntity tushuxinxi = tushuxinxiService.selectById(id); tushuxinxi.setClicknum(tushuxinxi.getClicknum()+1 ); tushuxinxi.setClicktime(new Date()); tushuxinxiService.updateById(tushuxinxi); return R.ok().put("data" , tushuxinxi); } @RequestMapping("/save") public R save (@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request) { tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000 )).longValue()); tushuxinxiService.insert(tushuxinxi); return R.ok(); } @RequestMapping("/add") public R add (@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request) { tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000 )).longValue()); tushuxinxiService.insert(tushuxinxi); return R.ok(); }
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 if (!request.getSession().getAttribute("role" ).toString().equals("管理员" )) { storeup.setUserid((Long)request.getSession().getAttribute("userId" )); } EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>(); PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params)); return R.ok().put("data" , page); } @RequestMapping("/lists") public R list ( StoreupEntity storeup) { EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>(); ew.allEq(MPUtil.allEQMapPre( storeup, "storeup" )); return R.ok().put("data" , storeupService.selectListView(ew)); } @RequestMapping("/query") public R query (StoreupEntity storeup) { EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>(); ew.allEq(MPUtil.allEQMapPre( storeup, "storeup" )); StoreupView storeupView = storeupService.selectView(ew); return R.ok("查询收藏表成功" ).put("data" , storeupView); } @RequestMapping("/info/{id}") public R info (@PathVariable("id") Long id) { StoreupEntity storeup = storeupService.selectById(id); return R.ok().put("data" , storeup); } @RequestMapping("/detail/{id}") public R detail (@PathVariable("id") Long id) { StoreupEntity storeup = storeupService.selectById(id); return R.ok().put("data" , storeup); } @RequestMapping("/save")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 @RestController @RequestMapping("/tushuxinxi") public class TushuxinxiController { @Autowired private TushuxinxiService tushuxinxiService; @RequestMapping("/page") public R page (@RequestParam Map<String, Object> params,TushuxinxiEntity tushuxinxi, HttpServletRequest request) { EntityWrapper<TushuxinxiEntity> ew = new EntityWrapper<TushuxinxiEntity>();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Wrapper<JiaonafajinEntity> wrapper = new EntityWrapper<JiaonafajinEntity>(); if (map.get("remindstart" )!=null ) { wrapper.ge(columnName, map.get("remindstart" )); } if (map.get("remindend" )!=null ) { wrapper.le(columnName, map.get("remindend" )); } String tableName = request.getSession().getAttribute("tableName" ).toString(); if (tableName.equals("yonghu" )) { wrapper.eq("yonghuming" , (String)request.getSession().getAttribute("username" )); } int count = jiaonafajinService.selectCount(wrapper); return R.ok().put("count" , count); } }
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 */ @RequestMapping("/save") public R save (@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request) { tushujieyue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000 )).longValue()); tushujieyueService.insert(tushujieyue); return R.ok(); } @RequestMapping("/add") public R add (@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request) { tushujieyue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000 )).longValue()); tushujieyueService.insert(tushujieyue); return R.ok(); } @RequestMapping("/update") public R update (@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request) { tushujieyueService.updateById(tushujieyue); return R.ok(); } @RequestMapping("/delete") public R delete (@RequestBody Long[] ids) { tushujieyueService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } @RequestMapping("/remind/{columnName}/{type}")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 @RestController @RequestMapping("/tushufenlei") public class TushufenleiController { @Autowired private TushufenleiService tushufenleiService;
——————————PayStart——————————
项目链接: https://javayms.github.io?id=351125140706201sq https://javayms.pages.dev?id=351125140706201sq