Auditing
Closed this issue · 3 comments
I'm having trouble getting the auditing feature to work. I'm on Spring Boot 2.1.2 and am using this starter. Part of this could be the fact that I'm very new to Spring Boot in general.
Should the EnableArangoAuditing
annotation be conditionally enabled somewhere in the starter? Is there already a simple way to enable it if I'm using the starter?
Right now I defined my own configuration class and added the EnableArangoAuditing
annotation to it. I've added the corresponding annotations needed to define my created and modified fields on my entity. Here's the error I get when I POST to my API. This is a WebFlux app:
141dfcf9] Resolved [IllegalArgumentException: Couldn't find PersistentEntity for type class com.wtcross.blueprint.workspace.Workspace!] for HTTP POST /workspaces
Here are the instructions I'm following:
https://github.com/arangodb/spring-data/blob/master/docs/Drivers/SpringData/Reference/Mapping/Auditing.md
This is a fresh install of the latest ArangoDB Enterprise.
I solved this problem by override the getEntityBasePackages() method。
@Configuration
@EnableArangoAuditing
@EnableArangoRepositories(basePackages = {"com.test.arango.learn"})
public class ArangoConfig implements ArangoConfiguration {
@Override
public ArangoDB.Builder arango() {
return new ArangoDB.Builder()
.host("127.0.0.1",8529)
.user("test").password("test").maxConnections(10);
}
@Override
public String database() {
return "test";
}
@Override
public String[] getEntityBasePackages() {
return new String[]{"com.test.arango.learn.entity"};
}
}
Closing since fixed, feel free to reopen in case of further questions.