This is an automated email from the ASF dual-hosted git repository.
adelbene pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new 9de3e8b WICKET-6834 Fixed guide instructions to set DEPLOYMENT mode
via code.
9de3e8b is described below
commit 9de3e8bcd8ae687cf0d038e9349d86c6131fdd25
Author: Andrea Del Bene <[email protected]>
AuthorDate: Wed Sep 30 12:33:07 2020 +0200
WICKET-6834 Fixed guide instructions to set DEPLOYMENT mode via code.
---
wicket-user-guide/src/main/asciidoc/maven/maven_1.adoc | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/wicket-user-guide/src/main/asciidoc/maven/maven_1.adoc
b/wicket-user-guide/src/main/asciidoc/maven/maven_1.adoc
index 5aa4cf1..5994c1c 100644
--- a/wicket-user-guide/src/main/asciidoc/maven/maven_1.adoc
+++ b/wicket-user-guide/src/main/asciidoc/maven/maven_1.adoc
@@ -48,11 +48,25 @@ The third way to set the running mode is using system
property _wicket.configura
java -Dwicket.configuration=deployment ...
----
-The last option is to set it in your Java code (e.g. in the init-method of
your WebApplication):
+The last option is to override getConfigurationType() method in your class
that extends WebApplication):
[source,java]
----
-setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);
+public class WicketApplication extends WebApplication
+{
+ @Override
+ public void init()
+ {
+ super.init();
+ // add your configuration here
+ }
+
+ @Override
+ public RuntimeConfigurationType getConfigurationType()
+ {
+ return RuntimeConfigurationType.DEPLOYMENT;
+ }
+}
----
Remember that system properties overwrite other settings, so they are ideal to
ensure that on production machine the running mode will be always set to
DEPLOYMENT.