Answer the question
In order to leave comments, you need to log in
How to avoid ClassNotFoundException in Spring + ArangoDb + Maven in a modularized project?
Created a module for working with arangoDb following the example . Here is the pom.xml:
Everything works well as it should.
I decided to split this example into modules, i.e. put everything that is not related to arango and spring data into a separate "core" module, and leave everything that is related to the database in the "kernel" working component.
pom.xml kernel:
Thus, only spring core was released into a separate "Core" module:
@SpringBootApplication
public class Core {
public static void main(String[] args) {
final Class<?>[] runner = new Class<?>[] { KernelRunner.class};
System.exit(SpringApplication.exit(SpringApplication.run(runner,args)));
}
}
@ComponentScan("com.name.proj.kernel") //пакет com.name.proj.kernel - из рабочего модуля (в котором вся логика с аранго)
public class KernelRunner implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
System.out.println("it is runner");
}
}
public interface MyObjectRepository extends ArangoRepository<MyObject, String>
<dependency>
<groupId>org.springframework.boot</groupId>
Это: <artifactId>spring-boot-starter</artifactId> заменить на это: <artifactId>spring-boot-starter-web</artifactId>
</dependency>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question