Caching ApacheIgnite、SpringData和mysql不能一起工作
我已经发表了这个项目 使用Spring数据JPA、Mysql和ApacheIgnite配置 这是Ignite缓存配置Caching ApacheIgnite、SpringData和mysql不能一起工作,caching,spring-boot,spring-data,spring-data-jpa,ignite,Caching,Spring Boot,Spring Data,Spring Data Jpa,Ignite,我已经发表了这个项目 使用Spring数据JPA、Mysql和ApacheIgnite配置 这是Ignite缓存配置 @Bean public Ignite igniteInstance() { IgniteConfiguration cfg = new IgniteConfiguration(); // Setting some custom name for the node. cfg.setIgniteInstanceName(
@Bean
public Ignite igniteInstance() {
IgniteConfiguration cfg = new IgniteConfiguration();
// Setting some custom name for the node.
cfg.setIgniteInstanceName("springDataNode");
// Enabling peer-class loading feature.
cfg.setPeerClassLoadingEnabled(true);
// Defining and creating a new cache to be used by Ignite Spring Data
// repository.
CacheConfiguration ccfg = new CacheConfiguration("FlightCache");
// Setting SQL schema for the cache.
ccfg.setIndexedTypes(Long.class, Flight.class);
cfg.setActiveOnStart(true);
cfg.setCacheConfiguration(ccfg);
return Ignition.start(cfg);
}
该项目有2个API,其中一个在没有Ignite的情况下工作,但配置了Ignite的存储库不工作。我不明白原因。您需要配置一个在MySQL数据源上运行的。
您还需要启用行为 没有例外,没有详细说明你实际上在做什么。没有提示,您试图解决的问题是什么。有人怎么回答这个问题呢?事实上,你的例子对我来说很有用。我已经添加了一个POST端点,它按照预期工作。请检查网络上是否没有其他与您冲突的Ignite节点。嗨,谢谢,当我添加新实体时,我会看一看,它是开始工作的,但它都在内存中,不存储在数据库中,也不从数据库中获取