【项目功能介绍】
本系统包含后台管理和前端app双端系统,后台管理的功能包含: 登录, 退出, 资源管理, 角色管理,资源权限分配, 数据字典管理,用户管理,
知识管理,动态管理,商品管理,领养社区管理,订单管理; app端功能包含: 注册,登录,退出, 轮播图,商品展示,商品加入购物车,购物
车结算, 我的订单, 发布动态,动态评论,养宠知识,宠物发布, 宠物领养, 用户基本信息管理, 用户头像修改, 密码修改
下载代码:
链接:https://pan.baidu.com/s/11f_aqeWLebbGwxJ16cMrTA
提取码:8888
【项目视频教程】
视频教程每个课时包含的内容见下图, 该套教程具有非常高的知识价值 并且 适合以下人群:
A. 想了解并且学习代码实现逻辑的同学
B. 想对代码进行二次开发的同学
C. 在课题设计和毕业设计中,需要对老师问答做到得心应手的同学
D.做论文时,需要技术和业务层面帮助进行文字描述以及绘制流程图(时序图, ER图, 原理图)的同学
【项目包含内容】
【运行环境】 IDEA, JDK1.8, MAVEN, AndroidStudio
【技术栈】
Web端
后台前端:layui,js、jQuery、css、html
后台框架:Java、Spring boot、Spring Mvc、Mybatis Plus、Shiro、ajax
数据库:Mysql5.7
App客户端
前端框架:xml、LinearLayout、RelativeLayout
后台框架:OkHttp、fastJson
【部分代码】
application.yml
server:
port: 8080
servlet:
context-path: /
myway:
system:
domain: http://192.168.0.103:8080/img/
#系统标题
title: 宠物社区管理平台
#系统权限
copyright: Copyright © 2022, 宠物社区管理平台, All Rights Reserved
spring:
freemarker:
charset: UTF-8
content-type: text/html
suffix: .html
template-loader-path: classpath:/templates
request-context-attribute: request
cache: false
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
datasource:
authority:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/db_project?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
type: com.alibaba.druid.pool.DruidDataSource
password: root
# 连接池的配置信息
# 初始化大小,最小等待连接数量,最大等待连接数量,最大连接数
initialSize: 1
minIdle: 1
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: true
testOnReturn: false
# 打开PSCache,并且指定每个连接上PSCache的大小
poolPreparedStatements: false
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
filters:
commons-log.connection-logger-name: stat,wall,log4j
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
logging:
level.com.myway.platform.mysql: debug
BaseController.java
package com.myway.platform.controller;
import com.myway.platform.handler.exception.NotLoginException;
import com.myway.platform.mysql.authority.entity.SysUserInfo;
import com.myway.platform.mysql.authority.service.ISysUserInfoService;
import lombok.SneakyThrows;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author: bruce
* @time on 2019/12/18 15:37
* @description:
*/
public abstract class BaseController {
@Value("${myway.system.title}")
protected String systemTitle;
@Value("${myway.system.copyright}")
protected String systemCopyRight;
@Value("${myway.system.domain}")
protected String doMain;
protected String filePath = "images/";
@Autowired
@Qualifier("sysUserInfoServiceImpl")
protected ISysUserInfoService sysUserInfoService;
public HttpServletRequest request() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
return request;
}
/**
* 获取系统用户会话信息
*
* @return
*/
@SneakyThrows
protected SysUserInfo getSessionSysUser() {
SysUserInfo principal = (SysUserInfo) SecurityUtils.getSubject().getPrincipal();
if (principal == null) {
throw new NotLoginException();
}
return principal;
}
protected List<String> getSessionSysUserRoles() {
List<String> roles = new ArrayList<>();
SysUserInfo sessionSysUser = getSessionSysUser();
SysUserInfo sysUserBasicInfo = sysUserInfoService.getById(sessionSysUser.getSysUserId());
String roleId = sysUserBasicInfo.getRoles();
if (!StringUtils.isEmpty(roleId)) {
roles.add(roleId);
}
return roles;
}
}
【项目代码截图】
【数据库截图】
【项目运行截图】