一、首先进行环境的准备
1.创建数据库
文章来源:https://www.toymoban.com/news/detail-698259.html
2.创建项目 依赖包如下文章来源地址https://www.toymoban.com/news/detail-698259.html
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.heima</groupId>
<artifactId>heima-leadnews</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>heima-leadnews-common</module>
<module>heima-leadnews-utils</module>
<module>heima-leadnews-model</module>
<module>heima-leadnews-feign-api</module>
<module>heima-leadnews-service</module>
<module>heima-leadnews-gateway</module>
<module>heima-leadnews-test</module>
</modules>
<!-- 继承Spring boot工程 -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
</parent>
<properties>
<!-- 项目源码及编译输出的编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- 项目编译JDK版本 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- 依赖包版本管理 -->
<spring.boot.version>2.3.9.RELEASE</spring.boot.version>
<commons.io.version>2.6</commons.io.version>
<commons.codec.version>1.12</commons.codec.version>
<lombok.version>1.18.8</lombok.version>
<mysql.version>5.1.46</mysql.version>
<mybatis.version>3.5.1</mybatis.version>
<mybatis.spring.version>2.0.1</mybatis.spring.version>
<mybatis.plus.version>3.4.1</mybatis.plus.version>
<lang3.version>3.5</lang3.version>
<pagehelper.version>1.2.3</pagehelper.version>
<jsoup.version>1.10.2</jsoup.version>
<jwt.version>0.9.1</jwt.version>
<fastjson.version>1.2.58</fastjson.version>
<fastjson.dataformat.version>2.9.8</fastjson.dataformat.version>
<spring.jwt.version>1.0.9.RELEASE</spring.jwt.version>
<spring.boot.admin.version>2.1.6</spring.boot.admin.version>
<spring.cloud.version>Hoxton.SR10</spring.cloud.version>
<curator.version>4.2.0</curator.version>
<hanlp.version>portable-1.3.4</hanlp.version>
<fastdfs.version>1.26.5</fastdfs.version>
<baidu.version>4.11.1</baidu.version>
<junit.version>4.12</junit.version>
<searchbox.version>6.3.1</searchbox.version>
<elasticsearch.version>7.2.0</elasticsearch.version>
<ali.core.version>4.1.1</ali.core.version>
<ali.green.version>3.4.1</ali.green.version>
<kafka.version>2.6.6</kafka.version>
<kafka.client.version>2.5.1</kafka.client.version>
<reflections.version>0.9.11</reflections.version>
<swagger.version>2.9.2</swagger.version>
<knife4j.version>2.0.2</knife4j.version>
<com.alibaba.cloud>2.2.5.RELEASE</com.alibaba.cloud>
<xxl.job.version>2.2.0-SNAPSHOT</xxl.job.version>
</properties>
<dependencies>
<!--日志处理包-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!--内部依赖工程-->
<dependency>
<artifactId>heima-leadnews-feign-api</artifactId>
<groupId>com.heima</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>heima-leadnews-common</artifactId>
<groupId>com.heima</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>heima-leadnews-model</artifactId>
<groupId>com.heima</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>heima-leadnews-utils</artifactId>
<groupId>com.heima</groupId>
<version>${project.version}</version>
</dependency>
<!-- Spring boot 特殊处理包 -->
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>${reflections.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- 排除默认的logback日志,使用log4j-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<version>${spring.boot.version}</version>
</dependency>
<!--Apache 工具包包-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons<
到了这里,关于基于springboot的登录功能的实现(超详细)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!