未验证 提交 786f0e28 编写于 作者: 智布道's avatar 智布道 👁 提交者: GitHub

Merge pull request #5 from DoyuTu/master

🍎 Updated Configuration
......@@ -62,7 +62,7 @@ ps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇
# 技术栈
- Springboot 2.0.1
- Springboot 2.0.8
- Apache Shiro 1.2.2
- Logback
- Redis
......@@ -99,9 +99,9 @@ ps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇
2. 新建数据库`CREATE DATABASE dblog;`
3. 导入数据库`docs/db/dblog.sql`
4. 修改配置文件
1. 数据库链接属性(在`resources/application-{env}.yml`配置文件中搜索`datasource`或定位到L.7)
2. redis配置(在`resources/application.yml`配置文件中搜索`redis`或定位到L.65)
3. mail配置(在`resources/application-{env}.yml`配置文件中搜索`mail`或定位到L.14)
1. 数据库链接属性(在`[blog-core]/resources/config/application-center-{env}.yml`配置文件中搜索`datasource`或定位到L.5)
2. redis配置(在`[blog-core]/resources/config/application-center-{env}.yml`配置文件中搜索`redis`或定位到L.14)
3. mail配置(在`resources/application-{env}.yml`配置文件中搜索`mail`或定位到L.10)
4.[七牛云](https://portal.qiniu.com/signup?code=3l8yx2v0f21ci)】配置(见sys_config表中qiniu_*开头的字段)
注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的`系统配置`页面修改相关配置内容
5. 运行项目(三种方式)
......@@ -176,4 +176,4 @@ ps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇
# 开源协议
[![license](https://img.shields.io/badge/license-GPL%20v3-yellow.svg)](https://gitee.com/yadong.zhang/DBlog/blob/master/LICENSE)
\ No newline at end of file
[![license](https://img.shields.io/badge/license-GPL%20v3-yellow.svg)](https://gitee.com/yadong.zhang/DBlog/blob/master/LICENSE)
......@@ -4,14 +4,8 @@ server:
basedir: /var/tmp/website-blog-admin
# SPRING PROFILES
spring:
datasource:
druid:
connection-init-sqls: set names utf8mb4
driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
profiles:
include: [center-dev]
# 指定默认MimeMessage的编码,默认为: UTF-8
mail:
default-encoding: UTF-8
......@@ -37,18 +31,8 @@ spring:
mail.smtp.connectiontimeout: 50000
mail.smtp.timeout: 30000
mail.smtp.writetimeout: 50000
# redis缓存服务配置
session:
store-type: redis
# Redis数据库索引(默认为0)
redis:
database: 5
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password: qwe!@#123
jedis:
pool:
# 连接池最大连接数(使用负值表示没有限制)
......@@ -76,6 +60,4 @@ app:
loginUrl: "/passport/login/"
successUrl: "/"
unauthorizedUrl: "/error/403"
# 创建网站的时间,用于计算已建站的天数,默认为2018-01-01
buildWebsiteDate: 2018-01-01 00:00:00
####################################自定义配置##########################################
......@@ -4,14 +4,8 @@ server:
basedir: /var/tmp/website-blog-admin
# SPRING PROFILES
spring:
datasource:
druid:
connection-init-sqls: set names utf8mb4
driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
profiles:
include: [center-test]
# 指定默认MimeMessage的编码,默认为: UTF-8
mail:
default-encoding: UTF-8
......@@ -37,18 +31,8 @@ spring:
mail.smtp.connectiontimeout: 50000
mail.smtp.timeout: 30000
mail.smtp.writetimeout: 50000
# redis缓存服务配置
session:
store-type: redis
# Redis数据库索引(默认为0)
redis:
database: 5
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password: qwe!@#123
jedis:
pool:
# 连接池最大连接数(使用负值表示没有限制)
......@@ -70,8 +54,6 @@ logging:
app:
# 是否启用kaptcha验证码
enableKaptcha: false
# 创建网站的时间,用于计算已建站的天数,默认为2018-01-01
buildWebsiteDate: 2018-01-01 00:00:00
# shiro配置项
shiro:
loginUrl: "/passport/login/"
......
spring:
profiles:
include: [center]
####### database Config #######
datasource:
druid:
connection-init-sqls: set names utf8mb4
driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username: root
password:
####### Redis Config #######
redis:
database: 5
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password:
####### redis缓存服务配置 #######
session:
store-type: redis
####### 自定义配置 #######
####### 自定义配置 #######
spring:
profiles:
include: [center]
####### database Config #######
datasource:
druid:
connection-init-sqls: set names utf8mb4
driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
####### Redis Config #######
redis:
database: 5
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password: qwe!@#123
####### redis缓存服务配置 #######
session:
store-type: redis
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
app:
# 创建网站的时间,用于计算已建站的天数,默认为2018-01-01
buildWebsiteDate: 2018-01-01 00:00:00
####### 自定义配置 #######
......@@ -4,14 +4,8 @@ server:
basedir: /var/tmp/website-blog-web
# SPRING PROFILES
spring:
datasource:
druid:
connection-init-sqls: set names utf8mb4
driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
profiles:
include: [center-dev]
# 指定默认MimeMessage的编码,默认为: UTF-8
mail:
default-encoding: UTF-8
......@@ -37,18 +31,8 @@ spring:
mail.smtp.connectiontimeout: 50000
mail.smtp.timeout: 30000
mail.smtp.writetimeout: 50000
# redis缓存服务配置
session:
store-type: redis
# Redis数据库索引(默认为0)
redis:
database: 5
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password: qwe!@#123
jedis:
pool:
# 连接池最大连接数(使用负值表示没有限制)
......@@ -72,8 +56,6 @@ logging:
app:
# 是否启用kaptcha验证码
enableKaptcha: false
# 创建网站的时间,用于计算已建站的天数,默认为2018-01-01
buildWebsiteDate: 2018-01-01 00:00:00
# braum过滤器,用于过滤恶意请求
braum:
......
......@@ -4,14 +4,8 @@ server:
basedir: /var/tmp/website-blog-web
# SPRING PROFILES
spring:
datasource:
druid:
connection-init-sqls: set names utf8mb4
driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
profiles:
include: [center-test]
# 指定默认MimeMessage的编码,默认为: UTF-8
mail:
default-encoding: UTF-8
......@@ -37,18 +31,8 @@ spring:
mail.smtp.connectiontimeout: 50000
mail.smtp.timeout: 30000
mail.smtp.writetimeout: 50000
# redis缓存服务配置
session:
store-type: redis
# Redis数据库索引(默认为0)
redis:
database: 5
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password: qwe!@#123
jedis:
pool:
# 连接池最大连接数(使用负值表示没有限制)
......@@ -63,6 +47,7 @@ spring:
timeout: 5000ms
# 默认的数据过期时间,主要用于shiro权限管理
expire: 2592000
# logging settings
logging:
path: /var/tmp/website-blog-web
......@@ -77,6 +62,4 @@ braum:
app:
# 是否启用kaptcha验证码
enableKaptcha: false
# 创建网站的时间,用于计算已建站的天数,默认为2018-01-01
buildWebsiteDate: 2018-01-01 00:00:00
####################################自定义配置##########################################
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册