Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
a5974a20
Commit
a5974a20
authored
Nov 12, 2019
by
macro
Browse files
去除https配置
parent
05e5cf6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
mall-portal/src/main/java/com/macro/mall/portal/config/TomcatConfig.java
deleted
100644 → 0
View file @
05e5cf6e
package
com.macro.mall.portal.config
;
import
org.apache.catalina.connector.Connector
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Profile
;
/**
* tomcat相关配置
* Created by macro on 2018/8/7.
*/
@Profile
(
"https"
)
@Configuration
public
class
TomcatConfig
{
@Value
(
"${http.port}"
)
private
Integer
port
;
@Bean
public
TomcatServletWebServerFactory
servletContainer
()
{
TomcatServletWebServerFactory
tomcat
=
new
TomcatServletWebServerFactory
();
tomcat
.
addAdditionalTomcatConnectors
(
createStandardConnector
());
// 添加http
return
tomcat
;
}
//配置http
private
Connector
createStandardConnector
()
{
Connector
connector
=
new
Connector
(
"org.apache.coyote.http11.Http11NioProtocol"
);
connector
.
setPort
(
port
);
return
connector
;
}
}
mall-portal/src/main/resources/application-https.yml
deleted
100644 → 0
View file @
05e5cf6e
server
:
port
:
8443
#https环境会开启https
ssl
:
key-store
:
keystore.p12
key-alias
:
tomcat
key-store-password
:
123456
key-store-type
:
PKCS12
spring
:
datasource
:
url
:
jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username
:
root
password
:
root
druid
:
initial-size
:
5
#连接池初始化大小
min-idle
:
10
#最小空闲连接数
max-active
:
20
#最大连接数
web-stat-filter
:
exclusions
:
"
*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
#不统计这些请求数据
stat-view-servlet
:
#访问监控网页的登录用户名和密码
login-username
:
druid
login-password
:
druid
data
:
mongodb
:
host
:
localhost
port
:
27017
database
:
mall-port
redis
:
host
:
localhost
# Redis服务器地址
database
:
0
# Redis数据库索引(默认为0)
port
:
6379
# Redis服务器连接端口
password
:
# Redis服务器连接密码(默认为空)
jedis
:
pool
:
max-active
:
8
# 连接池最大连接数(使用负值表示没有限制)
max-wait
:
-1ms
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-idle
:
8
# 连接池中的最大空闲连接
min-idle
:
0
# 连接池中的最小空闲连接
timeout
:
3000ms
# 连接超时时间(毫秒)
rabbitmq
:
host
:
localhost
port
:
5672
virtual-host
:
/mall
username
:
mall
password
:
mall
publisher-confirms
:
true
#如果对异步消息需要回调必须设置为true
# 日志配置
logging
:
level
:
org.springframework.data.mongodb.core
:
debug
com.macro.mall.mapper
:
debug
com.macro.mall.portal.dao
:
debug
mall-portal/src/main/resources/application.yml
View file @
a5974a20
...
@@ -7,8 +7,6 @@ mybatis:
...
@@ -7,8 +7,6 @@ mybatis:
-
classpath:dao/*.xml
-
classpath:dao/*.xml
-
classpath*:com/**/mapper/*.xml
-
classpath*:com/**/mapper/*.xml
http
:
port
:
8085
# http服务端口
jwt
:
jwt
:
tokenHeader
:
Authorization
#JWT存储的请求头
tokenHeader
:
Authorization
#JWT存储的请求头
secret
:
mall-portal-secret
#JWT加解密使用的密钥
secret
:
mall-portal-secret
#JWT加解密使用的密钥
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment