Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/main/java/com/chat/java/utils/ProxyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.stereotype.Component;
import reactor.netty.http.client.HttpClient;
import reactor.netty.tcp.ProxyProvider;



Expand Down Expand Up @@ -35,9 +36,10 @@ public class ProxyUtil {
* @return the proxy
*/
public ReactorClientHttpConnector getProxy() {
HttpClient httpClient = HttpClient.create().tcpConfiguration((tcpClient) -> {
return tcpClient;
});
HttpClient httpClient = HttpClient.create().tcpConfiguration((tcpClient) -> tcpClient.proxy(proxy -> proxy
.type(ProxyProvider.Proxy.HTTP)
.host("1081")
.port(1081)));
return new ReactorClientHttpConnector(httpClient);
}
}
10 changes: 5 additions & 5 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://127.0.0.1:3307/gpt?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&autoReconnect=true&failOverReadOnly=false
username: gpt
password: 123456
url: jdbc:mysql://129.211.92.71:3306/education_course?connectTimeout=1000&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: Zhangyifei7036
driver-class-name: com.mysql.cj.jdbc.Driver
filters: stat
maxActive: 20
Expand All @@ -19,8 +19,8 @@ spring:
poolPreparedStatements: true
maxOpenPreparedStatements: 20
redis:
host: 127.0.0.1
port: 6380
host: 101.43.150.51
port: 6379
password: 123456
database: 0
jedis:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server:
port: 8000
port: 80
tomcat:
uri-encoding: utf-8
spring:
Expand Down