This commit is contained in:
xiongxiaoyang 2022-05-22 22:16:08 +08:00
commit ac1e7bb395
2 changed files with 8 additions and 9 deletions

View File

@ -1,7 +1,3 @@
[![index]( https://s1.ax1x.com/2020/07/03/NOSA5q.jpg )]( https://cloud.tencent.com/act/cps/redirect?redirect=1052&cps_key=736e609d66e0ac4e57813316cec6fd0b&from=console )
# novel-cloud
[![Github stars](https://img.shields.io/github/stars/201206030/novel-cloud?logo=github)](https://github.com/201206030/novel-cloud)
[![Github forks](https://img.shields.io/github/forks/201206030/novel-cloud?logo=github)](https://github.com/201206030/novel-cloud)
[![Gitee star](https://gitee.com/novel_dev_team/novel-cloud/badge/star.svg?theme=gitee)](https://gitee.com/novel_dev_team/novel-cloud)
@ -12,6 +8,10 @@
https://201206030.github.io
#### 学习版
[基于 Sprint Boot 3 + Vue 3 开发的前后端分离学习型小说项目](https://github.com/201206030/novel)
#### 背景
小说网站业务难度适中,没有商城系统那种复杂的业务。但是作为互联网项目,一样需要面对大规模用户和海量数据的处理,所以高并发、高可用、高性能、高容错、可扩展性、可维护性也是小说网站设计需要考虑的问题,商城系统中所用到的技术同样适用于小说网站。综上所述,使用微服务架构来构建一个小说门户平台是非常有必要的,利用微服务构建的小说门户平台来学习现下流行技术相较于业务比较复杂的商场系统来说也是比较容易的,非常适合于没有实际微服务项目经验的同学用来学习和入门微服务技术栈。
@ -234,6 +234,4 @@ GitHub仓库地址 https://github.com/201206030/novel-cloud
![mini-code](https://s1.ax1x.com/2020/10/31/BUQJwq.png)
[![index](https://s1.ax1x.com/2020/07/03/NOSuMF.jpg)](https://www.aliyun.com/minisite/goods?userCode=uf4nasee )
# 部分截图在github上可能无法正常显示请下载到本地查看。

View File

@ -2,8 +2,9 @@ package com.java2nb.novel.common.utils;
import lombok.SneakyThrows;
import sun.misc.BASE64Encoder;
import java.util.Base64;
import java.util.Base64.Encoder;
import java.security.MessageDigest;
/**
@ -53,8 +54,8 @@ public class MD5Util {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] b1 = md.digest(str.getBytes());
//将等长字节利用Base64算法转换成字符串
BASE64Encoder encoder = new BASE64Encoder();
return encoder.encode(b1);
Encoder encoder = Base64.getEncoder();
return encoder.encodeToString(b1);
}
private static final String[] HEX_DIGITS = {"0", "1", "2", "3", "4", "5",