juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Microservice zip improvements.
Date Sun, 16 Dec 2018 16:17:33 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 8df581d  Microservice zip improvements.
     new 5d9f1cb  Merge branch 'master' of https://gitbox.apache.org/repos/asf/juneau.git
8df581d is described below

commit 8df581d5c14b3c2aa785b2166448414645aa249a
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Sun Dec 16 11:16:33 2018 -0500

    Microservice zip improvements.
---
 ...my-microservice.launch => my-jetty-microservice.launch} |  2 +-
 .../{my-microservice.cfg => my-jetty-microservice.cfg}     |  0
 ...my-microservice.launch => my-jetty-microservice.launch} |  0
 ...croservice.launch => my-springboot-microservice.launch} |  2 +-
 ...croservice.launch => my-springboot-microservice.launch} |  0
 .../juneau/microservice/springboot/template/App.java       | 14 ++++++++++++++
 6 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/juneau-microservice/juneau-microservice-jetty-template/build-overlay/my-microservice.launch
b/juneau-microservice/juneau-microservice-jetty-template/build-overlay/my-jetty-microservice.launch
similarity index 97%
rename from juneau-microservice/juneau-microservice-jetty-template/build-overlay/my-microservice.launch
rename to juneau-microservice/juneau-microservice-jetty-template/build-overlay/my-jetty-microservice.launch
index 461d58b..0746b33 100644
--- a/juneau-microservice/juneau-microservice-jetty-template/build-overlay/my-microservice.launch
+++ b/juneau-microservice/juneau-microservice-jetty-template/build-overlay/my-jetty-microservice.launch
@@ -6,6 +6,6 @@
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.juneau.microservice.jetty.template.App"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="my-microservice-jetty"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="my-jetty-microservice"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 </launchConfiguration>
diff --git a/juneau-microservice/juneau-microservice-jetty-template/my-microservice.cfg b/juneau-microservice/juneau-microservice-jetty-template/my-jetty-microservice.cfg
similarity index 100%
rename from juneau-microservice/juneau-microservice-jetty-template/my-microservice.cfg
rename to juneau-microservice/juneau-microservice-jetty-template/my-jetty-microservice.cfg
diff --git a/juneau-microservice/juneau-microservice-jetty-template/my-microservice.launch
b/juneau-microservice/juneau-microservice-jetty-template/my-jetty-microservice.launch
similarity index 100%
rename from juneau-microservice/juneau-microservice-jetty-template/my-microservice.launch
rename to juneau-microservice/juneau-microservice-jetty-template/my-jetty-microservice.launch
diff --git a/juneau-microservice/juneau-microservice-springboot-template/build-overlay/my-microservice.launch
b/juneau-microservice/juneau-microservice-springboot-template/build-overlay/my-springboot-microservice.launch
similarity index 96%
rename from juneau-microservice/juneau-microservice-springboot-template/build-overlay/my-microservice.launch
rename to juneau-microservice/juneau-microservice-springboot-template/build-overlay/my-springboot-microservice.launch
index 48f0632..33308e4 100644
--- a/juneau-microservice/juneau-microservice-springboot-template/build-overlay/my-microservice.launch
+++ b/juneau-microservice/juneau-microservice-springboot-template/build-overlay/my-springboot-microservice.launch
@@ -6,6 +6,6 @@
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.juneau.microservice.springboot.template.App"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="my-microservice-springboot"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="my-springboot-microservice"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 </launchConfiguration>
diff --git a/juneau-microservice/juneau-microservice-springboot-template/my-microservice.launch
b/juneau-microservice/juneau-microservice-springboot-template/my-springboot-microservice.launch
similarity index 100%
rename from juneau-microservice/juneau-microservice-springboot-template/my-microservice.launch
rename to juneau-microservice/juneau-microservice-springboot-template/my-springboot-microservice.launch
diff --git a/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/springboot/template/App.java
b/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/springboot/template/App.java
index 9d644e0..a6ade24 100644
--- a/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/springboot/template/App.java
+++ b/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/springboot/template/App.java
@@ -16,8 +16,10 @@ import org.apache.juneau.rest.springboot.*;
 import org.apache.juneau.rest.springboot.annotation.*;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.*;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
 import org.springframework.context.annotation.*;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.filter.HiddenHttpMethodFilter;
 
 /**
  * Entry point for Examples REST application when deployed as a Spring Boot application.
@@ -44,4 +46,16 @@ public class App {
 	public RootResources getRootResources() {
 		return new RootResources();
 	}
+
+
+	/**
+	 * If you want to parse URL-encoded form posts directly into beans, this call will disable
the HiddenHttpMethodFilter
+	 * which triggers form posts to be consumed.
+	 */
+	@Bean
+	public FilterRegistrationBean<HiddenHttpMethodFilter> registration(HiddenHttpMethodFilter
filter) {
+	    FilterRegistrationBean<HiddenHttpMethodFilter> registration = new FilterRegistrationBean<>(filter);
+	    registration.setEnabled(false);
+	    return registration;
+	}
 }


Mime
View raw message