From d13ab4e522e04be2fb5312c81bb0b0469f6a94ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Fri, 14 Aug 2020 17:55:36 +0800 Subject: [PATCH] =?UTF-8?q?add(Test):=20=E6=B5=8B=E8=AF=95=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 - .../resources/application-test.properties | 96 +++++++++++++++++++ 2 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/application-test.properties diff --git a/.gitignore b/.gitignore index b306679..e0d65e1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,5 @@ target/ # 本地项目的私有文件 -back-end/blog-dev.sql src/main/resources/application-dev.properties src/main/resources/application-prod.properties -src/main/resources/application-test.properties diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties new file mode 100644 index 0000000..f9bddea --- /dev/null +++ b/src/main/resources/application-test.properties @@ -0,0 +1,96 @@ +server.port=8081 + +# 七牛的密钥配置 +qiniu.accessKey= +qiniu.secretKey= +qiniu.bucket= +# sitemap 存放地址 +sitemap.path= +# 生成JWT时候的密钥 +jwt.secret=sdaniod213k123123ipoeqowekqwe + +##spring.jpa.show-sql=false +##spring.jpa.hibernate.ddl-auto=update + +mybatis.type-handlers-package=cn.celess.blog.mapper.typehandler +logging.level.cn.celess.blog.mapper=debug +# 上传单个文件的大小 +spring.servlet.multipart.max-file-size=10MB +# 上传文件的总大小 +spring.servlet.multipart.max-request-size=10MB + +spring.jackson.default-property-inclusion=non_null + + +################# 数据库 ################## +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource + +#h2 +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.url=jdbc:h2:mem:testdb;mode=mysql;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false +spring.datasource.username=sa +spring.datasource.password= + + +spring.datasource.platform=h2 +spring.datasource.sql-script-encoding=utf-8 +spring.datasource.initialization-mode=ALWAYS +spring.datasource.schema=classpath:sql/schema_h2.sql +spring.datasource.data=classpath:sql/data.sql + + +################## mybatis ################## +mybatis.mapper-locations=classpath:mapper/*.xml +mybatis.type-aliases-package=cn.celess.blog.entity + + +pagehelper.helper-dialect=mysql +pagehelper.reasonable=true +pagehelper.support-methods-arguments=true +pagehelper.params=count=countSql + + + +#### 用于nginx的代理 获取真实ip +server.use-forward-headers = true +server.tomcat.remote-ip-header = X-Real-IP +server.tomcat.protocol-header = X-Forwarded-Proto + + +############### email ############## +spring.mail.host=smtp.163.com +spring.mail.username= +spring.mail.password= +spring.mail.properties.mail.smtp.auth=true +spring.mail.properties.mail.smtp.starttls.enable=true +spring.mail.properties.mail.smtp.starttls.required=true +spring.mail.default-encoding=UTF-8 +spring.mail.port=465 +spring.mail.properties.mail.smtp.socketFactory.port=465 +spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory +spring.mail.properties.mail.smtp.socketFactory.fallback=false + + + +############### redis ############## + +# REDIS (RedisProperties) +# Redis数据库索引(默认为0) +spring.redis.database=1 +# Redis服务器地址 +spring.redis.host=127.0.0.1 +# Redis服务器连接端口 +spring.redis.port=6379 +# Redis服务器连接密码(默认为空) +spring.redis.password= +# 连接池最大连接数(使用负值表示没有限制) +spring.redis.jedis.pool.max-active=-1 +# 连接池最大阻塞等待时间(使用负值表示没有限制) +spring.redis.jedis.pool.max-wait=-1 +# 连接池中的最大空闲连接 +spring.redis.jedis.pool.max-idle=8 +# 连接池中的最小空闲连接 +spring.redis.jedis.pool.min-idle=0 +# 连接超时时间(毫秒) +spring.redis.timeout=5000 +