使用发布版本,这个应用程序代码可以工作。但是,切换到较新的快照,我现在得到了异常。
异常消息使我认为需要进行配置更改以使我的测试用例再次工作,但我一辈子都不知道它们需要什么。
任何帮助都将不胜感激。
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.4.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>6.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
我的测试用例正在使用注解:
- @Spring Boot测试
- @启用自动配置
- @Neo4j自动配置数据
Caused by: org.springframework.dao.PermissionDeniedDataAccessException: Unsupported authentication token, scheme 'none' is only allowed when auth is disabled.; Error code 'Neo.ClientError.Security.Unauthorized'
at org.springframework.data.neo4j.repository.support.Neo4jPersistenceExceptionTranslator.translateImpl(Neo4jPersistenceExceptionTranslator.java:105) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.neo4j.repository.support.Neo4jPersistenceExceptionTranslator.translateExceptionIfPossible(Neo4jPersistenceExceptionTranslator.java:83) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.neo4j.core.DefaultNeo4jClient.potentiallyConvertRuntimeException(DefaultNeo4jClient.java:187) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.neo4j.core.DefaultNeo4jClient.access$400(DefaultNeo4jClient.java:59) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.neo4j.core.DefaultNeo4jClient$DefaultRecordFetchSpec.one(DefaultNeo4jClient.java:298) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.neo4j.core.Neo4jTemplate$DefaultExecutableQuery.getSingleResult(Neo4jTemplate.java:525) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.neo4j.repository.query.Neo4jQueryExecution$DefaultQueryExecution.execute(Neo4jQueryExecution.java:53) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.neo4j.repository.query.AbstractNeo4jQuery.execute(AbstractNeo4jQuery.java:68) ~[spring-data-neo4j-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:135) ~[spring-data-commons-2.4.0-M2.jar:2.4.0-M2]
at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:119) ~[spring-data-commons-2.4.0-M2.jar:2.4.0-M2]
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:151) ~[spring-data-commons-2.4.0-M2.jar:2.4.0-M2]
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:130) ~[spring-data-commons-2.4.0-M2.jar:2.4.0-M2]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:80) ~[spring-data-commons-2.4.0-M2.jar:2.4.0-M2]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367) ~[spring-tx-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) ~[spring-tx-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.3.0-M2.jar:5.3.0-M2]
at com.sun.proxy.$Proxy133.findByName(Unknown Source) ~[na:na]
at ...
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) ~[spring-beans-5.3.0-M2.jar:5.3.0-M2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-5.3.0-M2.jar:5.3.0-M2]
... 81 common frames omitted
在我的测试的一些变体中,我得到:“请注意,Neo4j 4.0中的默认加密设置已更改”
1条答案
按热度按时间cygmwpex1#
您的应用程序属性是什么?
SDN6的语法已更改,但可能未将其写入文档
请参阅:
https://github.com/michael-simons/neo4j-sdn-ogm-tips/blob/master/examples/sdn6/src/main/resources/application.properties
啊,它实际上在自述文件中有它(但还没有在文档中):
https://github.com/spring-projects/spring-data-neo4j
此外,在 Boot 文档中:
https://docs.spring.io/spring-boot/docs/2.4.0-SNAPSHOT/reference/htmlsingle/#boot-features-connecting-to-neo4j