Springboot旅游网站
一、项目概述
介绍:
- 旅游网是一个基于Springboot框架设计的一个毕业设计,主要类似于一个电商系统
登陆方式:
- 前台:
登陆url:localhost:8080
首先需要注册一个账号才能进行登陆 - 后台:
登陆url:localhost:8080/admin
name:admin
password:123456
主要功能介绍:
前台:
- 用户登陆注册:手机验证码登陆注册
- 景点列表
- 相册墙,可以生成旅游相册
- 订购景点门票以及酒店
- 对订单的评论
- 找回密码,需要开启qq邮箱Smtp服务,使用邮箱验证码进行验证
后台:
- 用户管理
- 景点管理
- 相册管理
- 天气预报
- 消息管理
- 评论管理
- 首页轮播图 实现热门景点推荐
- 订单管理
- 需要源码+q 2439644676
二、网站架构
- 数据库 mysql
- 前端 Layui,BootStrap,Echars等技术
- 后端 SpringBoot、SpringDataJpa等
- 架构模式 半前后分离架构模式
- 模板引擎 thymeleaf
- 项目管理 Maven
三、部署教程
- 1、源码
https://pan.baidu.com/s/1a2vqnE7yJITFL6VZLMC4bg
提取码:m5yi - 2、安装redis
只需要安装即可,不需要额外的配置 redis安装的时候密码默认为空。然后在application.properties配置文件中将redis字段中的host改成你自己的即可。 - 3、安装RabbitMq
安装即可,然后默认的guest guest登入,开启消息队列,队列名为 sms,然后在application.properties配置文件中将rabbitmq字段中的host改成你自己的即可。 - 4、开启qq邮箱SMtp服务,
申请授权码。怎么开启qq邮箱Smtp服务,然后在配置文件中将mail.username和mail.password换成你的邮箱账号和授权码,注意这里面的password不是你的qq密码,是qq邮箱的授权码。 - 5、导入数据库
- 6、申请阿里云短信服务
短信服务的作用是注册验证。开通阿里云短信服务 - 7、开启阿里云oss对象存储
网站上的一些图片我们将其存放在阿里云对象存储中。开启阿里云oss对象存储
然后所有的准备工作做好了,我们就可以开始启动项目了,启动之前记得重新build一下。
三、运行效果
前台
- 1、首页:
-
2、注册
-
3、行影旅行
- 4、旅行相册
- 5、预定酒店
- 6、评价订单
后台:
-
1、后台登陆
-
2、后台首页面
-
3、天气预报
-
4、相册管理
-
5、酒店管理
-
6、景点及酒店订单管理
四、部分代码
pom.xml
<?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>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.xingying.travel</groupId>
<artifactId>travel</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>travel</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-solr</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>3.2.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<!-- GENERAL UTILS begin -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<!-- alipay -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
</dependency>
<!--aliyunOSS-->
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--fork : 如果没有该项配置devtools不会起作用,即应用不会restart -->
<fork>true</fork>
<!--支持静态文件热部署-->
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
</project>
application.properties
#thymeleaf
spring.thymeleaf.cache=false
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.check-template-location=true
spring.thymeleaf.mode=HTML5
#\u90AE\u7BB1\u9A8C\u8BC1
spring.mail.host=smtp.qq.com
spring.mail.username=个人QQ邮箱
spring.mail.password=邮箱密钥
spring.mail.default-encoding=UTF-8
#\u6570\u636E\u5E93\u914D\u7F6E
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/travel?characterEncoding=utf-8&useUnicode=true&characterEncoding=utf-8&autoReconnect=true
spring.datasource.username=root
spring.datasource.password=123456
#spring datajpa
spring.jpa.database=mysql
spring.jpa.show-sql=true
#\u963F\u91CC\u4E91\u77ED\u4FE1\u9A8C\u8BC1\u7801
aliyun.sms.accessKeyId=阿里密钥
aliyun.sms.accessKeySecret=阿里密钥
aliyun.sms.template_code=签名密钥
aliyun.sms.sign_name=签名名称
#OSS
aliyun.oss.endpoint=oss的路径
aliyun.oss.bucketname=OSS的文件名
aliyun.oss.keyid=阿里密钥
aliyun.oss.keysecret=阿里密钥
aliyun.oss.filehost=存储文件名
#rabbitMQ
spring.rabbitmq.host=127.0.0.1
#redis
spring.redis.host=127.0.0.1
server.port=8080