I'm adding my own answer in hopes that it helps someone in the future. 

I figured it out by looking at the code for org.apache.wicket.Application.
Here the developers mention that you should use the ServiceLoader class for
Initializers. https://issues.apache.org/jira/browse/WICKET-5997. I noticed
the Application.initInitializers method and saw the ServiceLoader class they
were talking about.

So I read up on the java.util.ServiceLoader class and it states the
following:

A service provider is identified by placing a provider-configuration file in
the resource directory META-INF/services. The file's name is the
fully-qualified binary name of the service's type. The file contains a list
of fully-qualified binary names of concrete provider classes, one per line.

So I created a META-INF/services folder and put a text file named
org.apache.wicket.IInitializer and inside the file I put the fully qualified
class name of my IInitializer implementation.

The warning went away and my Initializer was called on application startup
which is exactly what I wanted.

NOTE: If you are migrating from using wicket.properties make sure to take
out the "initializer=" part of the file. The new way is not a properties
file so it doesn't have key value pairs. It only has fully qualified class
names separated by new lines. See the java.util.ServiceLocator documentation
if you need more details.

Also if you are using maven, the META-INF/services folder will go in
src/main/resources.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conflicting-warnings-about-location-of-wicket-properties-in-Wicket-7-tp4673269p4673270.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to