0

Does anyone know how to get SpatialRepository @Autowiring in a spring boot app? I have put the additional dependency in my classpath

<dependency>
  <groupId>org.neo4j</groupId>
  <artifactId>neo4j-spatial</artifactId>
  <version>0.9</version>
</dependency>

with the following configuration options

@SuppressWarnings("unused")
@Configuration
@EnableAutoConfiguration 
@EnableTransactionManagement
@EnableNeo4jRepositories(basePackages = {"com.eanda.prototype", "test.com.eanda.prototype"})
@ComponentScan({"com.erranda.prototype", "org.springframework.data.neo4j"})

I have tried it all but no avail. My domain class is this:

    public interface ErrandRepository extends GraphRepository<Errand>, SpatialRepository<Errand> {}

I get the following exception when running a query on the spatial repo

    java.lang.IllegalArgumentException: No index provider 'spatial' found. Maybe the intended provider (or one more of its dependencies) aren't on the classpath or it failed to load.
4

1 回答 1

0

您是否将空间引擎引入现有数据库?您是否在插件目录中安装了空间扩展?洛伦佐

于 2015-01-18T21:54:47.510 回答