You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/12/04 13:03:48 UTC

[isis] 04/08: ISIS-2212; refactors for constructor injection for WebModuleH2Console

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 7108d55bf901ac4fce2da9736593e6796eb7fb08
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Dec 4 12:38:51 2019 +0000

    ISIS-2212; refactors for constructor injection for WebModuleH2Console
---
 .../extensions/h2console/webmodule/WebModuleH2Console.java  | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/extensions/persistence/h2console/src/main/java/org/apache/isis/extensions/h2console/webmodule/WebModuleH2Console.java b/extensions/persistence/h2console/src/main/java/org/apache/isis/extensions/h2console/webmodule/WebModuleH2Console.java
index 05521f7..6bd99e8 100644
--- a/extensions/persistence/h2console/src/main/java/org/apache/isis/extensions/h2console/webmodule/WebModuleH2Console.java
+++ b/extensions/persistence/h2console/src/main/java/org/apache/isis/extensions/h2console/webmodule/WebModuleH2Console.java
@@ -40,14 +40,19 @@ import lombok.val;
 @Service @Order(0)
 public class WebModuleH2Console implements WebModule  {
 
-    @Inject IsisSystemEnvironment isisSystemEnvironment;
-    @Inject IsisConfiguration isisConfiguration;
-
-
     private final static String SERVLET_NAME = "H2Console";
     private final static String SERVLET_CLASS_NAME = "org.h2.server.web.WebServlet";
     private final static String CONSOLE_PATH = "/db"; //XXX could be made a config value 
 
+    private final IsisSystemEnvironment isisSystemEnvironment;
+    private final IsisConfiguration isisConfiguration;
+
+    @Inject
+    public WebModuleH2Console(IsisSystemEnvironment isisSystemEnvironment, IsisConfiguration isisConfiguration) {
+        this.isisSystemEnvironment = isisSystemEnvironment;
+        this.isisConfiguration = isisConfiguration;
+    }
+
     @Getter private LocalResourcePath localResourcePathIfEnabled;
 
     @Override