mirror of
https://github.com/201206030/novel-cloud.git
synced 2025-07-29 22:48:47 +00:00
本地运行配置改动
This commit is contained in:
parent
10c5cb4045
commit
1e3f343d8e
@ -4,7 +4,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>io.github.xxyopen</groupId>
|
||||
<artifactId>novel-cloud</artifactId>
|
||||
<artifactId>novel-core</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -3,7 +3,7 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.10.110:8848
|
||||
server-addr: 192.168.0.151:8848
|
||||
openfeign:
|
||||
lazy-attributes-resolution: true
|
||||
|
||||
@ -23,7 +23,7 @@ spring:
|
||||
--- #---------------------数据库配置---------------------------
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/novel_test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://192.168.0.151:3306/novel-cloud?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: test123456
|
||||
# ShardingSphere-JDBC 配置
|
||||
@ -53,7 +53,7 @@ spring:
|
||||
ds_0:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
jdbcUrl: jdbc:mysql://localhost:3306/novel_test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
jdbcUrl: jdbc:mysql://192.168.0.151:3306/novel-cloud?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: test123456
|
||||
# 规则配置
|
||||
@ -85,13 +85,13 @@ spring:
|
||||
data:
|
||||
# Redis 配置
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
host: 192.168.0.151
|
||||
port: 6379
|
||||
# password: 123456
|
||||
password: test123456
|
||||
|
||||
# RabbitMQ 配置
|
||||
rabbitmq:
|
||||
addresses: "amqp://xxyopen:test123456@192.168.10.110"
|
||||
addresses: "amqp://xxyopen:test123456@192.168.0.151"
|
||||
virtual-host: novel
|
||||
template:
|
||||
retry:
|
||||
@ -112,6 +112,13 @@ management:
|
||||
exposure:
|
||||
# 公开所有的 Web 端点
|
||||
include: "*"
|
||||
# 端点启用配置
|
||||
endpoint:
|
||||
logfile:
|
||||
# 启用返回日志文件内容的端点
|
||||
enabled: true
|
||||
# 外部日志文件路径
|
||||
external-file: logs/novel.log
|
||||
info:
|
||||
env:
|
||||
# 公开所有以 info. 开头的环境属性
|
||||
|
@ -2,7 +2,7 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: 192.168.10.110:8848
|
||||
server-addr: 192.168.0.151:8848
|
||||
file-extension: yml
|
||||
extension-configs[0]:
|
||||
data‐id: novel-mysql.yml
|
||||
|
@ -6,7 +6,7 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.10.110:8848
|
||||
server-addr: 192.168.0.151:8848
|
||||
gateway:
|
||||
routes:
|
||||
- id: novel-home-front
|
||||
|
@ -4,7 +4,7 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: 192.168.10.110:8848
|
||||
server-addr: 192.168.0.151:8848
|
||||
file-extension: yml
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.10.110:8848
|
||||
server-addr: 192.168.0.151:8848
|
||||
boot:
|
||||
admin:
|
||||
discovery:
|
||||
|
@ -2,7 +2,6 @@ package io.github.xxyopen.novel.search.config;
|
||||
|
||||
import co.elastic.clients.json.jackson.JacksonJsonpMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
|
||||
import org.elasticsearch.client.RestClient;
|
||||
import org.elasticsearch.client.RestClientBuilder;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
@ -10,14 +9,6 @@ import org.springframework.boot.autoconfigure.elasticsearch.RestClientBuilderCus
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
/**
|
||||
* Elasticsearch 相关配置
|
||||
*
|
||||
@ -42,8 +33,9 @@ public class EsConfig {
|
||||
*/
|
||||
@Bean
|
||||
RestClient elasticsearchRestClient(RestClientBuilder restClientBuilder,
|
||||
ObjectProvider<RestClientBuilderCustomizer> builderCustomizers) {
|
||||
restClientBuilder.setHttpClientConfigCallback((HttpAsyncClientBuilder clientBuilder) -> {
|
||||
ObjectProvider<RestClientBuilderCustomizer> builderCustomizers) {
|
||||
//注释ssl报错 elasticsearch Unrecognized SSL message, plaintext connection?
|
||||
/*restClientBuilder.setHttpClientConfigCallback((HttpAsyncClientBuilder clientBuilder) -> {
|
||||
TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] chain, String authType) {
|
||||
@ -73,7 +65,8 @@ public class EsConfig {
|
||||
|
||||
builderCustomizers.orderedStream().forEach((customizer) -> customizer.customize(clientBuilder));
|
||||
return clientBuilder;
|
||||
});
|
||||
});*/
|
||||
|
||||
return restClientBuilder.build();
|
||||
}
|
||||
|
||||
|
@ -6,16 +6,16 @@ spring:
|
||||
active: dev
|
||||
elasticsearch:
|
||||
uris:
|
||||
- https://127.0.0.1:9200
|
||||
- http://192.168.0.151:9200
|
||||
username: elastic
|
||||
password: Fy2JWjJ1hcO2mi1USFLR
|
||||
password: Fy2JWjJ1hcO2mi1USFL1
|
||||
|
||||
# XXL-JOB 配置
|
||||
xxl:
|
||||
job:
|
||||
admin:
|
||||
### 调度中心部署根地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册;
|
||||
addresses: http://127.0.0.1:8080/xxl-job-admin
|
||||
addresses: http://192.168.0.151:8080/xxl-job-admin
|
||||
executor:
|
||||
### 执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册
|
||||
appname: xxl-job-executor-novel
|
||||
|
Loading…
Reference in New Issue
Block a user