No configuration setting found for key 'akka.version'

后端 未结 5 1786

I am learning akka-remoting and this is how my project looks

The project structure looks like

project/pom.xml
project/mymodule/pom.xml
project/mymo         


        
5条回答
  •  粉色の甜心
    2020-11-30 07:22

    It seems that your problem is bundling into a jar-with-dependencies, which causes problems with Akka, as described in the documentation:

    Warning

    Akka's configuration approach relies heavily on the notion of every module/jar having its own reference.conf file, all of these will be discovered by the configuration and loaded. Unfortunately this also means that if you put/merge multiple jars into the same jar, you need to merge all the reference.confs as well. Otherwise all defaults will be lost and Akka will not function.

    As suggested on the same page, you can use maven-shade-plugin to merge all the reference configurations:

    If you are using Maven to package your application, you can also make use of the Apache Maven Shade Plugin support for Resource Transformers to merge all the reference.confs on the build classpath into one.

    See also: Akka: missing akka.version

提交回复
热议问题