GithubHelp home page GithubHelp logo

ahchan99 / community Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 157 KB

使用 SpringBoot 和 Vue3.2 构建的牛客社区项目

Java 74.88% HTML 0.12% Vue 16.30% CSS 0.26% TypeScript 8.43%
java mybatis mysql redis springboot

community's Introduction

Community

Community 是牛客网讨论区实战项目,用于巩固 Web 开发所学的知识。

技术栈

后端

Java 1.8 + Spring Boot 2.5.6 + MyBatis-Plus 3.3.2 + MySQL 5.7

前端

TypeScript + Vue 3.2 + Pinia + Element Plus

技术点

登录与注册

基于 Spring Security 框架实现了用户的登录、登出和访问权限控制; 登录时 ,使用 Redis 进行缓存登录验证码,并设置缓存时间用于判断其是否失效; 注册时,通过 JavaMailSender 设置邮箱发送验证激活链接。

点赞功能

当访问浏览储文章或评论的时候,根据 id 从 Redis 中查询点赞总数, 如果有就直接使用 Redis 的数据进行覆盖, 若没有则将数据库中的点赞数对 Redis 进行缓存填充; 若用户为登录状态也将同理缓存用户的点赞状态, 在 Redis 中通过点赞状态变更情况计算点赞数,保证点赞功能的高可用性。 最后,通过设置 Quartz 定时将 Redis 缓存数据刷回 MySQL 数据库同步数据并清空 Redis 缓存。

其他

使用 Jasypt 对配置文件进行加密,启动项目时候需要,添加 jasypt.encryptor.password 值。 查询使用 MyBatis-Plus 提供的 Mapper,分页功能使用 PageHelper

在线体验

admin/admin

演示图

4256ec4ac8f6a748512c5932a558199.png 5f6b14be41f5acf28832afa1f9f98aa.png

community's People

Contributors

chenjiajun1999 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.