diff --git a/.gitignore b/.gitignore index 73e8959..c4c8f6c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,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-prod.properties b/src/main/resources/application-prod.properties deleted file mode 100644 index 78b0784..0000000 --- a/src/main/resources/application-prod.properties +++ /dev/null @@ -1,83 +0,0 @@ -server.port=8081 - -# ţԿ -qiniu.accessKey=${QINIU_ACCESSKEY} -qiniu.secretKey=${QINIU_SECRETKEY} -qiniu.bucket=xiaohai -# sitemap ŵַ -sitemap.path=/www/wwwroot/celess.cn/sitemap.xml -# JWTʱԿ -jwt.secret=${JWT_SECRETKEY} - -#mybatis.type-handlers-package=cn.celess.blog.mapper.typehandler - - -spring.jpa.show-sql=false -spring.jpa.hibernate.ddl-auto=update -# ϴļĴС -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 -spring.datasource.url=${MYSQL_URL_PROD} -spring.datasource.username=${MYSQL_USERNAME_PROD} -spring.datasource.password=${MYSQL_PASSWORD_PROD} -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver - - -################## 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=${MAIL_HOST_PROD} -spring.mail.username=${MAIL_USERNAME_PROD} -spring.mail.password=${MAIL_PWD_PROD} -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=0 -# Redisַ -spring.redis.host=127.0.0.1 -# RedisӶ˿ -spring.redis.port=6379 -# Redis루ĬΪգ -spring.redis.password=${REDIS_PROD} -# ӳʹøֵʾûƣ -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 \ No newline at end of file diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties deleted file mode 100644 index 8dc731a..0000000 --- a/src/main/resources/application-test.properties +++ /dev/null @@ -1,87 +0,0 @@ -server.port=8081 - -# ţԿ -qiniu.accessKey=${QINIU_ACCESSKEY} -qiniu.secretKey=${QINIU_SECRETKEY} -qiniu.bucket=xiaohai -# sitemap ŵַ -sitemap.path=classpath - # JWTʱԿ -jwt.secret=${JWT_SECRETKEY_TEST} - -##spring.jpa.show-sql=false -##spring.jpa.hibernate.ddl-auto=update - -mybatis.type-handlers-package=cn.celess.blog.mapper.typehandler - -# ϴļĴС -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 -spring.datasource.url=${MYSQL_URL_TEST} -spring.datasource.username=${MYSQL_USERNAME_TEST} -spring.datasource.password=${MYSQL_PASSWORD_TEST} -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver - - -################## 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=${MAIL_HOST_PROD} -spring.mail.username=${MAIL_USERNAME_PROD} -spring.mail.password=${MAIL_PWD_PROD} -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=celess.cn -# RedisӶ˿ -spring.redis.port=6379 -# Redis루ĬΪգ -spring.redis.password=${REDIS_PROD} -# ӳʹøֵʾûƣ -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 - diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 37a7772..e0c3787 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,4 +2,6 @@ spring.profiles.active=prod ####七牛的配置 ####cn.celess.blog.service.serviceimpl.QiniuServiceImpl logging.level.cn.celess.blog=debug -logging.level.cn.celess.blog.mapper=info \ No newline at end of file +logging.level.cn.celess.blog.mapper=info + +## 修改openSource 添加-test 文件用于测试 -prod文件用于线上发布 \ No newline at end of file