{"release":{"tag":{"name":"v2.0","path":"/gz-yami/mall4j/tags/v2.0","tree_path":"/gz-yami/mall4j/tree/v2.0","message":"","commit":{"id":"764b89d1219027e97dd1176c5d6efae01d37f075","short_id":"764b89d","title":"sql","title_markdown":"sql","description":"","description_markdown":"","message":"sql\n","message_markdown":"sql","detail_path":"/gz-yami/mall4j/commit/764b89d1219027e97dd1176c5d6efae01d37f075","commits_path":"/gz-yami/mall4j/commits/764b89d1219027e97dd1176c5d6efae01d37f075","tree_path":"/gz-yami/mall4j/tree/764b89d1219027e97dd1176c5d6efae01d37f075","author":{"name":"菠萝凤梨","email":"18902722133@163.com","username":"pineapples","user_path":"/pineapples","enterprise_user_path":null,"image_path":"https://foruda.gitee.com/avatar/1677143456058414836/8592476_pineapples_1611066621.png!avatar30","is_gitee_user":true,"is_enterprise_user":false,"widget_url":""},"committer":{"name":"菠萝凤梨","email":"18902722133@163.com","username":"pineapples","user_path":"/pineapples","enterprise_user_path":null,"image_path":"https://foruda.gitee.com/avatar/1677143456058414836/8592476_pineapples_1611066621.png!avatar30","is_gitee_user":true,"is_enterprise_user":false,"widget_url":""},"authored_date":"2022-04-11T09:50:12+08:00","committed_date":"2022-04-11T09:50:12+08:00","signature":null,"build_state":null},"archive_path":"/gz-yami/mall4j/repository/archive/v2.0","signature":null},"operating":{"edit":false,"download":true,"destroy":false,"enterprise_forbid_zip":false},"release":{"title":"🔥🔥🔥Mall4j 2.0 发布拉~","path":"/gz-yami/mall4j/releases/tag/v2.0","tag_path":"/gz-yami/mall4j/tree/v2.0","project_id":6267877,"created_at":"2022-04-13T16:01:03+08:00","is_prerelease":false,"description":"Mall4j开源登录重构啦!\r\n\r\n此次开源登录重构更新了不少内容,详情如下:\r\n\r\n1. ##### 去除Spring OAuth2使用自研的Token代替授权\r\n\r\n 去除`spring-security-oauth2`相关依赖,自己写`TokenStore`来对Token进行管理,包括存储token并返回,刷新token,清除token,校验token等方法\r\n\r\n2. ##### 使用Controller代替Filter进行登录授权\r\n\r\n 移除原本`LoginAuthenticationFilter`之类的登录过滤,使用`AdminLoginController`和`LoginController`进行登录授权\r\n\r\n3. ##### 保留Spring Security作为Web防火墙,不使用security的认证授权登录\r\n\r\n 使用`MallWebSecurityConfigurerAdapter`来实现防火墙功能\r\n\r\n4. ##### 将Token相关逻辑重新抽取,阅读起来简单易懂\r\n\r\n 1. 将`yami-shop-security`模块拆分成三大块,分别为admin,api,common模块\r\n 2. 移除原`com.yami.shop.security.exception`下的异常,使用`YamiShopBindException`进行统一处理\r\n 3. 统一了`SecurityUtils`中获取普通用户和平台用户信息的代码\r\n 4. 移除原`yami-shop-api`模块下`com.yami.shop.api.security`的代码,同时移除原`yami-shop-admin`模块下`com.yami.shop.admin.security`的代码\r\n\r\n5. ##### 前端登录加密\r\n\r\n 1. 前端使用密钥对时间戳+密码组成的字符串进行ASE加密\r\n 2. 后台在`com.yami.shop.security.common.manager.PasswordManager`的`decryptPassword`方法对前端传过来的密码进行解密\r\n\r\n6. ##### 后台登录验证码更新\r\n\r\n 1. 引入captcha做验证码功能\r\n\r\n ```xml\r\n \u003Cdependency\u003E\r\n \u003CgroupId\u003Ecom.anji-plus\u003C/groupId\u003E\r\n \u003CartifactId\u003Ecaptcha\u003C/artifactId\u003E\r\n \u003Cversion\u003E1.3.0\u003C/version\u003E\r\n \u003C/dependency\u003E\r\n ```\r\n\r\n 2. `yami-shop-security/yami-shop-security-common/src/main/resources/captcha`新增资源文件\r\n\r\n 3. 使用`CaptchaConfig`存储底图到redis中,`CaptchaCacheServiceRedisImpl`适配验证码在redis中的储存\r\n\r\n7. ##### 使用Kryo序列化替代原本的Fst序列化\r\n\r\n 为了兼容token和验证码相关序列化逻辑,此番Mall4j使用Kryo替代了原本的fst\r\n\r\n 1. kryo版本:4.0.2\r\n 2. 移除原本的`com.yami.shop.common.serializer.redis.FstRedisSerializer`,新增了`com.yami.shop.common.serializer.redis.KryoRedisSerializer`做redis序列化\r\n\r\n8. ##### 更新了版本依赖\r\n\r\n 1. spring-boot:2.3.12.RELEASE\r\n\r\n 2. 升级了一系列第三方依赖库\r\n\r\n - hutool:5.7.15\r\n\r\n - swagger-bootstrap:1.9.6\r\n\r\n - redisson:3.12.5\r\n\r\n - 由于**redisson版本提升**,相关配置文件也相对应更新了,删除了原本`singleServerConfig`的`pingTimeout`、`reconnectionTimeout`、`failedAttempts`这三个配置\r\n\r\n - 序列化由原本的\r\n\r\n ```yml\r\n codec:\r\n class: com.yami.shop.common.serializer.redisson.FstCodec\r\n ```\r\n\r\n 修改为\r\n\r\n ```yml\r\n codec:\r\n class: org.redisson.codec.KryoCodec\r\n ```\r\n\r\n 3. 新增了版本依赖\r\n\r\n - transmittable-thread-local:2.12.1\r\n\r\n \r\n\r\n","author":{"name":"商城系统","username":"gz-yami_admin","path":"/gz-yami_admin","avatar_url":"https://foruda.gitee.com/avatar/1677035825015960945/5094767_gz-yami_admin_1578980102.png!avatar30"},"attach_files":[],"zip_download_url":"/gz-yami/mall4j/releases/tag/v2.0.zip","tar_download_url":"/gz-yami/mall4j/releases/tag/v2.0.tar.gz"}}}