本节包含以下几部分内容。
- Studio配置
- ESB Server配置
- Governor配置
# Studio配置
以下配置需与IPv4不同,其余配置请参考studio解压安装。
- 在“D:/studio/server/EOS/_srv/startup.conf”文件中,修改LocalIP为IPv6地址,修改配置如下:
#Mon Apr 23 09:41:21 CST 2018
AdminPort=6200
LocalIP=[3fff:0:0:0:0:0:0:30]
ESB_SERVER_ID=ESB-Server
- 如果为IPv6环境的数据库,修改“D:/studio/server/conf/application.yml”文件下的数据库连接和elasticsearch IP为IPV6地址,如下所示:
server:
port: 6200
app-server:
min-spare-threads: 100
max-threads: 500
max-connections: 1000
accept-count: 200
basedir: ${user.dir}
accesslog:
enabled: true
pattern: "%t [%a] [%b] [%m] [%s] [%D] [%S] [%I][%H://%v%U%q]"
file-date-format: .yyyy-MM-dd
directory: ../logs
prefix: pas_access_log
suffix: .log
spring:
autoconfigure:
exclude: org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration
jpa:
hibernate:
ddl-auto: none
properties:
database: MYSQL
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
enable_lazy_load_no_trans: true
datasource:
druid:
username: root
password: 123456
url: jdbc:mysql://address=(protocol=tcp)(host=3fff::3)(port=3306)/IPv6test
driver-class-name: com.mysql.jdbc.Driver
max-active: 20
min-idle: 10
query-timeout: 5
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
validationQuery: select 1 from eos_unique_table
max-wait: 5000
max-wait-thread-count: 10
validation-query-timeout: 3
transaction-query-timeout: 5
redis:
enable: true
timeout: 5000
host: 127.0.0.1
port: 6379
password: 123456
pool:
max-wait: 10000
max-active: 500
min-idle: 50
max-idle: 250
esb:
path:
ignored:
- /favicon.ico #默认配置,不可删除
jms:
timeout: 300 #单位秒
policy-data-init-time:
#分别可以按天,小时,分钟,秒为单位,设置每次执行同步程序相隔的时间。
#例如,设置间隔时间为一天,Days=1,Hours=24,Minutes=60,Seconds=60
days: 1
hours: 24
minutes: 60
seconds: 60
#以下hour,min,sec为设置同步程序的启动时间。
#例如,16:30:00启动程序,hour=16,min=30,sec=00
hour: 12
min: 0
sec: 0
collector:
global:
intervalTime: 10000 #单位ms
sys:
resource:
enabled: true
thread:
enabled: true
module:
state:
enabled: true
thread:
enabled: true
endpoint:
enabled: true
mq:
state:
enabled: true
database:
init: false
#强制初始化
enforceInit: false
elasticsearch:
enabled: true
ioThreadCount: 50
connectTimeout: 60000 #单位ms
maxTotal: 10000
maxPerRoute: 1000
numberOfShards: 1
numberOfReplicas: 0
refreshInterval: 10s
username: elastic
password: primeton000000
certificate: F:/http_ca.crt
hosts:
- ip: [3fff:0:0:0:0:0:0:30]
port: 9200
protocol: https
eos:
application:
sys-code: EOS-DEMO-SYS
sys-key: dc6baaed30e541d78bb91274803d9432
sms:
#service-url: http://unify1.gx.cmcc:10024/SmsMonitor/jsonsms
service-url: http://10.185.22.187:10024/SmsMonitor/jsonsms
# ESB Server配置
以下配置需与IPv4不同,其余配置请参考server解压安装。
- 在“Primeton_ESB_9.0.0_Server\server\EOS_srv\startup.conf”文件中,修改LocalIP为IPv6地址,修改配置如下:
#Mon Apr 23 09:41:21 CST 2018
AdminPort=6200
LocalIP=[3fff:0:0:0:0:0:0:30]
ESB_SERVER_ID=ESB-Server
- 如果为IPv6环境的数据库,在“Primeton_ESB_9.0.0_Server\server\conf\application.yml”文件中,修改数据库连接和elasticsearch IP为IPV6地址,如下所示:
server:
port: 6200
app-server:
min-spare-threads: 100
max-threads: 500
max-connections: 1000
accept-count: 200
basedir: ${user.dir}
accesslog:
enabled: true
pattern: "%t [%a] [%b] [%m] [%s] [%D] [%S] [%I][%H://%v%U%q]"
file-date-format: .yyyy-MM-dd
directory: ../logs
prefix: pas_access_log
suffix: .log
spring:
autoconfigure:
exclude: org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration
jpa:
hibernate:
ddl-auto: none
properties:
database: MYSQL
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
enable_lazy_load_no_trans: true
datasource:
druid:
username: root
password: 123456
url: jdbc:mysql://address=(protocol=tcp)(host=3fff::3)(port=3306)/IPv6test
driver-class-name: com.mysql.jdbc.Driver
max-active: 20
min-idle: 10
query-timeout: 5
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
validationQuery: select 1 from eos_unique_table
max-wait: 5000
max-wait-thread-count: 10
validation-query-timeout: 3
transaction-query-timeout: 5
redis:
enable: true
timeout: 5000
host: 127.0.0.1
port: 6379
password: 123456
pool:
max-wait: 10000
max-active: 500
min-idle: 50
max-idle: 250
esb:
path:
ignored:
- /favicon.ico #默认配置,不可删除
jms:
timeout: 300 #单位秒
policy-data-init-time:
#分别可以按天,小时,分钟,秒为单位,设置每次执行同步程序相隔的时间。
#例如,设置间隔时间为一天,Days=1,Hours=24,Minutes=60,Seconds=60
days: 1
hours: 24
minutes: 60
seconds: 60
#以下hour,min,sec为设置同步程序的启动时间。
#例如,16:30:00启动程序,hour=16,min=30,sec=00
hour: 12
min: 0
sec: 0
collector:
global:
intervalTime: 10000 #单位ms
sys:
resource:
enabled: true
thread:
enabled: true
module:
state:
enabled: true
thread:
enabled: true
endpoint:
enabled: true
mq:
state:
enabled: true
database:
init: false
#强制初始化
enforceInit: false
elasticsearch:
enabled: true
ioThreadCount: 50
connectTimeout: 60000 #单位ms
maxTotal: 10000
maxPerRoute: 1000
numberOfShards: 1
numberOfReplicas: 0
refreshInterval: 10s
username: elastic
password: primeton000000
certificate: F:/http_ca.crt
hosts:
- ip: [3fff:0:0:0:0:0:0:30]
port: 9200
protocol: https
eos:
application:
sys-code: EOS-DEMO-SYS
sys-key: dc6baaed30e541d78bb91274803d9432
sms:
#service-url: http://unify1.gx.cmcc:10024/SmsMonitor/jsonsms
service-url: http://10.185.22.187:10024/SmsMonitor/jsonsms
# Governor配置
以下配置需与IPv4不同,其余配置请参考governor解压安装。
- 如果为IPv6环境的数据库,修改“Primeton_ESB_9.0.0_Governor_Standalone\config\application-esb.properties”文件下的elasticsearch hosts为IPV6地址,如下所示:
#esb restTemplate
esb.business=true
esb.database.init=false
esb.database.enforceInit=false
esb.rest.client.socket.timeout=20000
esb.rest.client.connect.timeout=10000
esb.rest.client.connectionRequest.timeout=10000
esb.rest.client.evictIdleConnections=60
esb.rest.client.ConnectionTimeToLive=60
elasticsearch.enabled=true
elasticsearch.ioThreadCount=50
elasticsearch.connectTimeout=60000
elasticsearch.maxTotal=10000
elasticsearch.maxPerRoute=1000
elasticsearch.numberOfShards=1
elasticsearch.numberOfReplicas=0
elasticsearch.refreshInterval=10s
elasticsearch.username=elastic
elasticsearch.password=ryOKQ7c1oq6EWwazcF6AvQ==
elasticsearch.certificate=F:/http_ca.crt
elasticsearch.hosts[0].ip=[3fff:0:0:0:0:0:0:30]
elasticsearch.hosts[0].port=9200
elasticsearch.hosts[0].protocol=https
修改“Primeton_ESB_9.0.0_Governor_Standalone\config\ESB\config\user-config.xml”文件下的数据库url为IPV6地址,如下所示:
<group name="default">
<configValue key="Database-Type">MySql</configValue>
<configValue key="Jdbc-Type"/>
<configValue key="C3p0-DriverClass">com.mysql.jdbc.Driver</configValue>
<configValue key="C3p0-Url">jdbc:mysql://address=(protocol=tcp)(host=3fff::3)(port=3306)/IPv6test</configValue>
<configValue key="C3p0-UserName">root</configValue>
<configValue key="C3p0-Password">root</configValue>
<configValue key="C3p0-PoolSize">10</configValue>
<configValue key="C3p0-MaxPoolSize">50</configValue>
<configValue key="C3p0-MinPoolSize">10</configValue>
<!-- //seconds, 0 means connections never expire -->
<configValue key="C3p0-MaxIdleTime">600</configValue>
<!-- //idle connections never tested -->
<configValue key="C3p0-IdleConnectionTestPeriod">900</configValue>
<configValue key="C3p0-MaxStatements">0</configValue>
<configValue key="C3p0-NumHelperThreads">1</configValue>
<configValue key="Transaction-Isolation">ISOLATION_DEFAULT</configValue>
<configValue key="Test-Connect-Sql">SELECT count(*) from EOS_UNIQUE_TABLE</configValue>
<configValue key="Retry-Connect-Count">-1</configValue>
</group>
修改“Primeton_ESB_9.0.0_Governor_Standalone\config\application.properties”文件中的redis host为IPV6地址,如下所示:
server.port=8080
spring.pid.file=pid
spring.profiles.active=nacos,afc,esb,job
spring.application.name=ESB
spring.jmx.default-domain=${spring.application.name}
spring.cloud.inetutils.preferred-networks=192.168
server.app-server.min-spare-threads=100
server.app-server.max-threads=500
server.app-server.max-connections=1000
server.app-server.accept-count=200
server.app-server.connection-timeout=60000
management.health.elasticsearch.enabled=false
spring.web.resources.static-locations=file:./webapp
management.endpoints.web.exposure.include=hystrix.stream,health,info,loggers,eos,mappings
spring.main.allow-bean-definition-overriding=true
out.config.folder=config
eos.profiles.active=dev
eos.cache.mode=redis
eos.admin.port=${server.port}
eos.application.sys-code=EOS-DEMO-SYS
eos.application.sys-key=dc6baaed30e541d78bb91274803d9432
spring.session.store-type=none
# redis
spring.redis.host=[3fff:0:0:0:0:0:0:30]
spring.redis.port=6379
spring.redis.password=123456
spring.redis.lettuce.pool.max-active=100
spring.redis.lettuce.pool.max-idle=100
spring.redis.lettuce.pool.max-wait=5000
# hibernate
spring.jpa.open-in-view=false
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
spring.jpa.properties.hibernate.connection.handling_mode=IMMEDIATE_ACQUISITION_AND_HOLD
spring.jpa.properties.hibernate.new_generator_mappings=false
spring.jpa.properties.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.properties.database=MYSQL
spring.mvc.dateFormat=yyyy-MM-dd HH:mm:ss
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
spring.jackson.serialization.write-dates-as-timestamps=false
#swagger
swagger.enable=false
# feign
feign.client.config.default.connectTimeout=2000
feign.client.config.default.readTimeout=1000
feign.hystrix.enabled=true
#AFC sdk || starter
console.deploy.type=starter
#mock port
afc.console.mock.port=1080