Open ElanZh opened 5 years ago
使用MongoDB存储事务日志时,需要配置zookeeper,业务系统需要向spring定义一个CuratorFramework的bean实例。
使用MongoDB存储事务日志时,需要配置zookeeper,业务系统需要向spring定义一个CuratorFramework的bean实例。
我并没有配置事务日志,并且在启动类上已经加了 exclude = { MongoAutoConfiguration.class }
这个配置是默认的吗?还是说要在哪关掉?
使用MongoDB存储事务日志时,需要配置zookeeper,业务系统需要向spring定义一个CuratorFramework的bean实例。
maven配置里已经拆除这些依赖:
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-zookeeper-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-zookeeper-discovery</artifactId>
</exclusion>
<exclusion>
<groupId>com.netflix.eureka</groupId>
<artifactId>eureka-client</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-consul-discovery</artifactId>
</exclusion>
</exclusions>
样例的main类上一般都加了这么几行注释:
// 按请求粒度负载均衡(使用MongoDB存储事务日志):需引入SpringCloudConfiguration; <br />
// 按事务粒度负载均衡(使用文件系统存储事务日志):需引入SpringCloudSecondaryConfiguration;
当通过@Import(SpringCloudConfiguration.class)
引入bytetcc配置时,就说明是使用MongoDB存储事务日志了,这时就需要配置zookeeper定义CuratorFramework的bean实例;
如果想用文件记录事务日志,可以使用@Import(SpringCloudSecondaryConfiguration.class)
这样的配置。
样例的main类上一般都加了这么几行注释:
// 按请求粒度负载均衡(使用MongoDB存储事务日志):需引入SpringCloudConfiguration; <br />
// 按事务粒度负载均衡(使用文件系统存储事务日志):需引入SpringCloudSecondaryConfiguration;
当通过
@Import(SpringCloudConfiguration.class)
引入bytetcc配置时,就说明是使用MongoDB存储事务日志了,这时就需要配置zookeeper定义CuratorFramework的bean实例; 如果想用文件记录事务日志,可以使用@Import(SpringCloudSecondaryConfiguration.class)
这样的配置。
明天我找找,用IDEA打开样例的时候乱码没注意
连接池使用Hikari,但是我有没有手动配置连接池,都会报以下错误: