我正在尝试使用 MongoDB 数据库设置 Spring Boot 应用程序。这是我拥有的依赖项的摘录(以 Gradle 表示)。
compile("org.springframework.boot:spring-boot-starter-web:1.5.1.RELEASE")
compile("org.springframework.boot:spring-boot-starter-data-jpa:1.5.1.RELEASE")
compile("org.springframework.boot:spring-boot-starter-data-mongodb:1.5.1.RELEASE")
compile("org.springframework.boot:spring-boot-starter-hateoas:1.5.1.RELEASE")
compile("org.springframework.boot:spring-boot-starter-security:1.5.1.RELEASE")
compile("org.springframework.security:spring-security-test:1.5.1.RELEASE)
testCompile("org.springframework.boot:spring-boot-starter-test:1.5.1.RELEASE")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.8")
Run Code Online (Sandbox Code Playgroud)
我的 @Document 注释 Java 类包含 OffsetDateTime 属性。
@Document(collection = "reports")
public class ReportDocument implements Serializable {
@Id private String id;
@Version private Long version;
//...
private OffsetDateTime start;
private OffsetDateTime end;
//...
}
Run Code Online (Sandbox Code Playgroud)
当我调用检索这些文档的 REST-Controller 时,它失败并出现异常
org.springframework.data.mapping.model.MappingException: No property null found on entity class java.time.OffsetDateTime to bind constructor parameter to!
at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74) ~[spring-data-commons-1.13.0.RELEASE.jar:na]
at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) ~[spring-data-commons-1.13.0.RELEASE.jar:na]
at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) ~[spring-data-commons-1.13.0.RELEASE.jar:na]
at org.springframework.data.convert.ClassGeneratingEntityInstantiator.createInstance(ClassGeneratingEntityInstantiator.java:83) ~[spring-data-commons-1.13.0.RELEASE.jar:na]
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:257) …Run Code Online (Sandbox Code Playgroud) 我开发了一个Azure DevOps扩展。现在,我想自动化发布过程。从这里开始旅程。按照这里的理论,现实对我而言似乎有所不同。
对我来说,每次通过命令行发布的尝试都以
tfx extension publish --auth-type pat -t
7dblablablablablablablablazq --share-with examplecompany0123
TFS Cross Platform Command Line Interface v0.6.3
Copyright Microsoft Corporation
Checking if this extension is already published
It isn't, create a new extension.
error: Received response 401 (Not Authorized). Check that your personal
access token is correct and hasn't expired.
Run Code Online (Sandbox Code Playgroud)
我对该错误消息401的第一个猜测是,我可能有一个错误的PAT。通过查看我的PAT管理层,我发现一切似乎都很好。
所以,现在我在五杆门口像牛一样面对。我只是没有找到失败的根源。在座的任何人都已经把这个菜鸟初学者的问题抛在脑后,已经达到了新的水平,可以为我提供帮助吗?
我正在开发Azure DevOps扩展。试用DevOps UI扩展示例对我提出了一个问题。我在具有更精美UI的Azure DevOps中启用了预览功能。Azure默认集线器和集线器组(如“测试”,“回购”等)的菜单栏中确实带有漂亮的彩色图标。而我的自定义示例UI则没有。它们只是灰色的。而且看来我无法为我的自定义集线器和集线器组显示图标。这里有人更了解这个问题吗?