Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIS平台自身的MySQL连接URL要加 useSSL=false 参数 #130

Closed
ChenShuai1981 opened this issue Jun 7, 2022 · 2 comments
Closed

TIS平台自身的MySQL连接URL要加 useSSL=false 参数 #130

ChenShuai1981 opened this issue Jun 7, 2022 · 2 comments
Labels
3.8.0 bug Something isn't working

Comments

@ChenShuai1981
Copy link

ChenShuai1981 commented Jun 7, 2022

在tis-web-config/config.properties文件中改用mysql数据库,如下

project.name=TIS
runtime=daily

tis.datasource.type=mysql
tis.datasource.url=127.0.0.1
tis.datasource.port=3306
tis.datasource.username=root
tis.datasource.password=root
tis.datasource.dbname=tis_console
zk.host=127.0.0.1:2181/tis/cloud

assemble.host=127.0.0.1
tis.host=127.0.0.1

启动前后端服务,访问http://localhost:4200时后端服务会抛错,如下:
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at sun.security.ssl.HandshakeContext.(HandshakeContext.java:171)
at sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:103)
at sun.security.ssl.TransportContext.kickstart(TransportContext.java:220)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:437)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:415)
at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:186)
... 69 more

修复方法是在 tis-common-dao/src/main/java/com/qlangtech/tis/manage/spring/TISDataSourceFactory.java

"?useUnicode=yes&characterEncoding=utf8");

改为

"?useSSL=false&useUnicode=yes&characterEncoding=utf8");

重新编译运行再访问就不会抛错了。

@baisui1981 baisui1981 added bug Something isn't working 3.8.0 labels Jun 7, 2022
@baisui1981
Copy link
Member

收到

@baisui1981
Copy link
Member

complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8.0 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants