Online novels | Implementing novel online reading network based on SpringBoot+Vue

About the author: Java, front-end, and Python have been developed for many years, and have worked as engineers, project managers, and architects.

Main contents: Java project development, Python project development, university data and AI project development, microcontroller project design, interview technology compilation, latest technology sharing

Collect, like and avoid getting lost. It’s good to follow the author

Get the source code at the end of the article

Project number: BS-PT-119

One, environment introduction

Locale: Java: jdk1.8

Database: Mysql: mysql5.7

Application server: Tomcat: tomcat8.5.31

Development tools: IDEA or eclipse

Development technology: SpringBoot + Vue

2. Project Introduction

This system is divided into two major modules: the user side and the management side. The functions on the user side are divided into: personal center, creation module, reading module, and home page display module. The management side is divided into personal information management module, account management module, and announcement management. Module, novel recommendation management module, novel classification management module.

Personal Center: User registration and login, modifying personal information and logging out

Reading module: read novels, collect novels, comment on novels, search novels

Creation module: divided into novel management and novel chapter management. Novel management includes: creating novels, modifying information and deleting novels. Novel chapter management includes: viewing chapters, adding chapters, modifying chapters and deleting chapters.

Home page display module: Editor’s recommendation carousel, new product rankings, etc.

Personal information management module: log in and log out of the management page

Account management module: query user accounts, ban user accounts, and unblock user accounts

Announcement management module: add announcements, modify announcements and delete announcements

Novel recommendation management module: query novels, recommend novels and cancel recommendations

Novel category management module: View all categories and the number of novels they contain, modify categories and delete categories.

Table 3-1 User function description

function name

Function description

User registration

Users register accounts to achieve identity recognition and save basic information

User login

Users log in to the system and obtain more operating permissions

Personal information management

View personal information and support modifying personal information

Log out

Exit the current account and reduce user operation permissions

Collect novels/bookshelf management

The novels collected by the user are displayed in my bookshelf, and the user can also cancel the collection in my bookshelf

Search Novels

Users can search for novels by categories they are interested in or by keywords

Read novels

Users can read novel chapters without logging in

Review Novel

User comments on any novel

Publish a novel

Novel created by author and user

Novel Management

After author users create novels, they manage the novels, such as adding chapters, modifying novel information, viewing chapters, etc.

User Management

The administrator can view all account information in the backend system, search for user accounts based on keywords, and block/unblock user accounts

Announcement Management

The administrator operates the homepage announcement

Novel recommendation management

The administrator can view all novel information and perform fuzzy queries based on the novel title. Recommend/unrecommend novels based on clicks or collections

Novel Classification Management

The administrator manages novel categories, and categories containing novels cannot be deleted

2 Non-functional requirements

(1) Performance requirements:

After the user operates on the page, the server needs to respond to the relevant operation within 3 seconds. The resource consumption during runtime is mainly consumed in image reading, and other text data consumes less.

  1. Reliability requirements:

When using the operating system, the system failure frequency should be controlled to 0 as much as possible. Various factors that may cause failure should be investigated and classified into degrees. Exceptions should be handled in advance according to the degree to enhance the system’s ease of recovery.

Before putting it into use, test each function of the system to predict and resolve possible failures as much as possible to reduce the probability of failure.

  1. Usability requirements:

The system page design is simple and the layout is reasonable. Each operation prompt should be simple, easy to understand and clear at a glance. User-oriented documents should introduce each operation function in detail, and training materials can be a little simple.

  1. Security requirements:

The interface for user login and registration is encrypted using Spring Security. The password can be stored in the database only after encryption. Related operation requests are judged whether to be released based on user permissions.

  1. Operating environment constraints:

There are no special requirements for the operating environment of this system. You only need to send a request through the browser in the form of a link to access the data in the server.

  1. External interface:

There are format restrictions on the input data format. Relevant restrictions are prompted before submitting the data. The frequency of data interaction with the system must be kept as real-time as possible.

Three, system display

register log in

System homepage

Latest published chapters

Classification display: you can sort by collection volume and click volume

Category viewing: you can read and comment online, and save it to your own bookshelf

Online reading: you can change the background

View all categories

Personal Center

If registered as an author: you can create online

Create a new novel

Publish chapter content

Chapter management

Backend administrator management functions

User Management

Novel management

Recommendation management

Four. Core code display

package com.cwx.novel.controller;


import com.cwx.novel.dto.OneChapterDto;
import com.cwx.novel.entity.Chapter;
import com.cwx.novel.entity.Novel;
import com.cwx.novel.service.impl.ChapterServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * Front-end controller
 *</p>
 *
 * @author znz
 * @since 2022-10-13
 */
@RestController
@RequestMapping("/public/chapter")
public class ChapterController {

    @Autowired
    private ChapterServiceImpl chapterService;



    @ApiOperation("Query an existing chapter of the novel")
    @RequestMapping("/loadOneChapterByNovelId")
    public OneChapterDto loadOneChapterByNovelId(Integer chapterNovelId, Integer novelId) {
        return chapterService.loadOneChapterByNovelId(chapterNovelId, novelId);
    }


    @ApiOperation("Query the latest chapters of this novel")
    @RequestMapping("/loadNewChapterByNovelId")
    public Chapter loadNewChapterByNovelId(Integer novelId) {
        return chapterService.loadNewChapterByNovelId(novelId);
    }

    @ApiOperation("Add novel chapter")
    @RequestMapping("/addChapter")
    public void addChapter(Chapter chapter) {
        chapterService.addChapter(chapter);
    }

    @ApiOperation("Query all chapters of this novel")
    @RequestMapping("/loadAllChapterByNovelId")
    public List<Chapter> loadAllChapterByNovelId(Integer novelId) {
        return chapterService.loadAllChapterByNovelId(novelId);
    }

    @ApiOperation("Update novel chapter")
    @RequestMapping("/updateChapter")
    public Integer updateChapter(Chapter chapter) {
        return chapterService.updateChapter(chapter);
    }

    @ApiOperation("Delete novel chapter")
    @RequestMapping("/deleteChapter")
    public Integer deleteChapter(Integer chapterId, Integer novelId) {
        return chapterService.deleteChapter(chapterId, novelId);
    }

    @ApiOperation("Query novels with the latest chapters")
    @RequestMapping("/loadNewNovelByCreateDate")
    public List<OneChapterDto> loadNewNovelByCreateDate() {
        return chapterService.loadNewNovelByCreateDate();
    }
}

package com.cwx.novel.controller;


import com.cwx.novel.entity.Notice;
import com.cwx.novel.service.NoticeService;
import com.cwx.novel.service.impl.NoticeServiceImpl;
import com.cwx.novel.service.impl.NovelServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * Front-end controller
 *</p>
 *
 * @author znz
 * @since 2022-10-14
 */
@RestController
public class NoticeController {

    @Autowired
    private NoticeServiceImpl noticeService;

    @ApiOperation("Read all announcements")
    @RequestMapping("/public/notice/loadAllNotice")
    public List<Notice> loadAllNotice() {
        return noticeService.loadAllNotice();
    }

    @ApiOperation("Administrator adds announcement")
    @RequestMapping("/admin/notice/insertNotice")
    public Integer insertNotice(Notice notice) {
        return noticeService.insertNotice(notice);
    }

    @ApiOperation("Administrator Modification Announcement")
    @RequestMapping("/admin/notice/updateNotice")
    public Integer updateNotice(Notice notice) {
        return noticeService.updateNotice(notice);
    }


    @ApiOperation("Administrator delete announcement")
    @RequestMapping("/admin/notice/deleteNoticeById")
    public Integer deleteNoticeById(Integer id) {
        return noticeService.deleteNoticeById(id);
    }




}

package com.cwx.novel.controller;


import com.cwx.novel.dto.UserDto;
import com.cwx.novel.entity.User;
import com.cwx.novel.service.impl.UserServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * Front-end controller
 *</p>
 *
 * @author znz
 * @since 2022-10-11
 */
@Api("User operation")
@RestController
@RequestMapping("/public/user")
public class UserController {

    @Autowired
    private UserServiceImpl userService;

    @PostMapping("/updateUserPwd")
    public Integer updateUserPwd(String pwd1, Integer id){
        return userService.updateUserPwd(pwd1, id);
    }

    @PostMapping("/loadUserAllById")
    public UserDto loadUserAllById(Integer id){
        return userService.loadUserAllById(id);
    }

    @PostMapping("/updateUser")
    public Integer updateUser(UserDto user){
        return userService.updateUser(user);
    }

    @PostMapping("/reloadUser")
    public Integer reloadUser(Integer id){
        return userService.reloadUser(id);
    }

    @PostMapping("/loadUserAllByNovelId")
    public UserDto loadUserAllByNovelId(Integer novelId){
        return userService.loadUserAllByNovelId(novelId);
    }

    @PostMapping("/followIt")
    public Integer followIt(Integer uid, Integer fid){
        return userService.followIt(uid, fid);
    }
    @PostMapping("/unFollowIt")
    public Integer unFollowIt(Integer uid, Integer fid){
        return userService.unFollowIt(uid, fid);
    }
    @PostMapping("/IsFollowIt")
    public Integer IsFollowIt(Integer uid, Integer fid){
        return userService.IsFollowIt(uid, fid);
    }

    @PostMapping("/loadFollowUserByUid")
    public List<UserDto> loadFollowUserByUid(Integer uid){
        return userService.loadFollowUserByUid(uid);
    }

}

5. Display of related works

Practical projects based on Java development, Python development, PHP development, C# development and other related languages

Front-end practical projects developed based on Nodejs, Vue and other front-end technologies

Related works based on WeChat applet and Android APP application development

Development and application of embedded Internet of Things based on 51 microcontroller and other embedded devices

AI intelligent applications based on various algorithms

Various data management and recommendation systems based on big data

The knowledge points of the article match the official knowledge files, and you can further learn relevant knowledge. Cloud native entry-level skills treeHomepageOverview 17043 people are learning the system