If there are multiple reference.conf files in class path, there is no way to predict in which order Typesafe config will read these files.
It's important to namespace your custom configuration so there is no chance of some other library stepping over your settings. On Tue, Jun 9, 2015 at 11:43 AM Maatary Okouya <[email protected]> wrote: > Thanks for the tip. > > I'm readying the typeSafe config doc now. > > However i am confused between what is said in akka doc and typesafe doc. > > When fetching config file in the classpath, does it only fetch what is at > the root or in all folder in the classpath such as inside jars ? > > Concerning your advise, it is indeed in line with what is said in the doc > of typesafe. However i'm curious to understand what would happen. Akka as a > reference conf, if my application add a reference conf, what will happen? > Presumably from what i red, a merge, but what value is taken from my app, > vs akka. More generally what is the merge strategy when there are multiple > reference.conf. > > Best > M > > > On Tuesday, June 9, 2015 at 1:07:30 PM UTC-4, Dragisa Krsmanovic wrote: > >> Akka uses Typesafe config. >> >> You should rename application.conf to reference.conf in you library to >> allow user of your library to override configuration. Typesafe config >> automatically includes all reference.conf and application.conf it finds in >> the classpath. With the later having precedence. >> >> >> https://github.com/typesafehub/config >> >> >> >> On Tue, Jun 9, 2015 at 9:55 AM Maatary Okouya <[email protected]> >> wrote: >> > Hi, >>> >>> I'm developing a lib that use akka. When the main program that will use >>> my lib will run, how to make sure that the application.conf that is inside >>> my lib is actually used ? >>> >>> I have a red the configuration topic of the doc, but i think i need more >>> detail to understand how an actor system fetch for configuration. >>> >>> >>> Although i am clear on how it would work in a standalone application, it >>> is less clear how that will work, when integrated to a Web app of the >>> Tomcat model. That is, my app is in tomcat, and my lib is about to be an >>> external dependency of the app. I have trouble with how to manage the >>> config file. *Can it be shipped with my lib, shall the webapp define a >>> new one, if so, where should it be set (with respect to the TomCat webapp >>> model i.e. its resource folder). * >>> >>> *When developing my lib, obviously application.conf is in the >>> src/resource folder, and therefore get added at the head of the jar.* >>> >>> >>> *What happens, if no config file is provided ? is there some hardwired >>> default value ? * >>> >>> *When the web-app is started, would the Actor system magically look for >>> the application.conf that is in my jar ? * >>> >>> >>> *I think to a certain degree there is the more general question of >>> understanding what happens to libs that get shipped with their default >>> configuration in their jar. * >>> >>> *I hope some can give me some heads up on that. * >>> >>> >>> *Many thanks,* >>> >>> *Daniel* >>> >>> -- >>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>> >>>>>>>>>> Check the FAQ: >>> http://doc.akka.io/docs/akka/current/additional/faq.html >>> >>>>>>>>>> Search the archives: >>> https://groups.google.com/group/akka-user >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Akka User List" group. >>> >> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To post to this group, send email to [email protected]. >> >> >>> Visit this group at http://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
