You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bd...@apache.org on 2021/04/16 16:03:23 UTC

[shiro] branch single-spring-boot created (now ac00970)

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

bdemers pushed a change to branch single-spring-boot
in repository https://gitbox.apache.org/repos/asf/shiro.git.


      at ac00970  Combine Spring Boot starters (web and non-web) into single module

This branch includes the following new commits:

     new ac00970  Combine Spring Boot starters (web and non-web) into single module

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[shiro] 01/01: Combine Spring Boot starters (web and non-web) into single module

Posted by bd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bdemers pushed a commit to branch single-spring-boot
in repository https://gitbox.apache.org/repos/asf/shiro.git

commit ac009702d1e8d6a52ec23ba2a7414f87924a6f6f
Author: Brian Demers <bd...@apache.org>
AuthorDate: Tue Apr 13 11:23:29 2021 -0400

    Combine Spring Boot starters (web and non-web) into single module
    
    This mirrors the non-boot module (where the web bits are optional)
    
    *Conditionals are in place to NOT load the web related config
    * The previous module is still built, but just contains dependencies on the previous (and required servlet deps)
---
 pom.xml                                            |  5 +++
 support/spring-boot/spring-boot-starter/pom.xml    | 10 +++++
 .../autoconfigure/ShiroWebAutoConfiguration.java   |  2 +
 .../autoconfigure/ShiroWebFilterConfiguration.java |  2 +
 .../ShiroWebMvcAutoConfiguration.java              |  2 +
 .../additional-spring-configuration-metadata.json  | 36 +++++++++++++++++
 .../src/main/resources/META-INF/spring.factories   |  3 ++
 .../src/main/resources/META-INF/spring.provides    |  2 +-
 .../web/ConfiguredGlobalFiltersTest.groovy         |  0
 .../web/DisabledGlobalFiltersTest.groovy           |  0
 .../web/ShiroWebSpringAutoConfigurationTest.groovy |  0
 .../ShiroWebAutoConfigurationTestApplication.java  |  0
 .../spring-boot/spring-boot-web-starter/pom.xml    | 19 ---------
 .../src/main/resources/META-INF/NOTICE             | 15 -------
 .../additional-spring-configuration-metadata.json  | 46 ----------------------
 .../src/main/resources/META-INF/spring.factories   |  4 --
 .../src/main/resources/META-INF/spring.provides    |  1 -
 .../web/WebSpringFactoriesTest.groovy              | 42 --------------------
 18 files changed, 61 insertions(+), 128 deletions(-)

diff --git a/pom.xml b/pom.xml
index ed757f1..8772616 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1196,6 +1196,11 @@
                 <artifactId>spring-boot-test</artifactId>
                 <version>${spring-boot.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-web</artifactId>
+                <version>${spring-boot.version}</version>
+            </dependency>
 
             <!-- Guice -->
             <dependency>
diff --git a/support/spring-boot/spring-boot-starter/pom.xml b/support/spring-boot/spring-boot-starter/pom.xml
index f797e6d..100d3ca 100644
--- a/support/spring-boot/spring-boot-starter/pom.xml
+++ b/support/spring-boot/spring-boot-starter/pom.xml
@@ -46,6 +46,16 @@
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-configuration-processor</artifactId>
             <optional>true</optional>
         </dependency>
diff --git a/support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.java b/support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.java
similarity index 96%
rename from support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.java
rename to support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.java
index 3b89b63..49732ae 100644
--- a/support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.java
+++ b/support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.java
@@ -41,6 +41,7 @@ import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.boot.autoconfigure.AutoConfigureBefore;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -50,6 +51,7 @@ import org.springframework.context.annotation.Configuration;
 @Configuration
 @AutoConfigureBefore(ShiroAutoConfiguration.class)
 @AutoConfigureAfter(ShiroWebMvcAutoConfiguration.class)
+@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
 @ConditionalOnProperty(name = "shiro.web.enabled", matchIfMissing = true)
 public class ShiroWebAutoConfiguration extends AbstractShiroWebConfiguration {
 
diff --git a/support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebFilterConfiguration.java b/support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebFilterConfiguration.java
similarity index 94%
rename from support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebFilterConfiguration.java
rename to support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebFilterConfiguration.java
index 81a11ec..05af40c 100644
--- a/support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebFilterConfiguration.java
+++ b/support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebFilterConfiguration.java
@@ -24,6 +24,7 @@ import org.apache.shiro.spring.web.config.AbstractShiroWebFilterConfiguration;
 import org.apache.shiro.web.servlet.AbstractShiroFilter;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
 import org.springframework.boot.web.servlet.FilterRegistrationBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -34,6 +35,7 @@ import java.util.List;
  * @since 1.4.0
  */
 @Configuration
+@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
 @ConditionalOnProperty(name = "shiro.web.enabled", matchIfMissing = true)
 public class ShiroWebFilterConfiguration extends AbstractShiroWebFilterConfiguration {
 
diff --git a/support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebMvcAutoConfiguration.java b/support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebMvcAutoConfiguration.java
similarity index 90%
rename from support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebMvcAutoConfiguration.java
rename to support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebMvcAutoConfiguration.java
index 26fdeb7..bd30c1b 100644
--- a/support/spring-boot/spring-boot-web-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebMvcAutoConfiguration.java
+++ b/support/spring-boot/spring-boot-starter/src/main/java/org/apache/shiro/spring/config/web/autoconfigure/ShiroWebMvcAutoConfiguration.java
@@ -21,6 +21,7 @@ package org.apache.shiro.spring.config.web.autoconfigure;
 import org.apache.shiro.spring.web.config.ShiroRequestMappingConfig;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
@@ -28,5 +29,6 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
 @Configuration
 @ConditionalOnClass(RequestMappingHandlerMapping.class)
 @Import(ShiroRequestMappingConfig.class)
+@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
 @ConditionalOnProperty(name = "shiro.web.enabled", matchIfMissing = true)
 public class ShiroWebMvcAutoConfiguration { }
diff --git a/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index 3737aac..5ef2115 100644
--- a/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -11,6 +11,42 @@
       "type": "java.lang.Boolean",
       "description": "A boolean flag that can disable all Shiro Spring Boot starters.  This is mostly useful during testing or debugging, or if you want to compare behavior when Shiro is enabled or disabled.",
       "defaultValue": true
+    },
+    {
+      "name": "shiro.web.enabled",
+      "type": "java.lang.Boolean",
+      "description": "A boolean flag that can disable all Shiro Spring Boot starters.  This is mostly useful during testing or debugging, or if you want to compare behavior when Shiro is enabled or disabled.",
+      "defaultValue": true
+    },
+    {
+      "name": "shiro.loginUrl",
+      "type": "java.lang.String",
+      "description": "The application's login URL to be assigned to all acquired Filters that subclass AccessControlFilter or 'null' if no value should be assigned globally.",
+      "defaultValue": "/login.jsp"
+    },
+    {
+      "name": "shiro.successUrl",
+      "type": "java.lang.String",
+      "description": "The application's after-login success URL to be assigned to all acquired Filters that subclass AuthenticationFilter or null if no value should be assigned globally.",
+      "defaultValue": "/"
+    },
+    {
+      "name": "shiro.unauthorizedUrl",
+      "type": "java.lang.String",
+      "description": "The application's 'unauthorized' URL to apply to as a convenience to all discovered AuthorizationFilter instances.",
+      "defaultValue": null
+    },
+    {
+      "name": "shiro.sessionManager.sessionIdCookieEnabled",
+      "type": "java.lang.String",
+      "description": "Enable or disable session tracking via a cookie.",
+      "defaultValue": true
+    },
+    {
+      "name": "shiro.sessionManager.sessionIdUrlRewritingEnabled",
+      "type": "java.lang.String",
+      "description": "Enable or disable session tracking via a URL parameter.  If your site requires cookies, it is recommended you disable this.",
+      "defaultValue": true
     }
   ]
 }
\ No newline at end of file
diff --git a/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.factories b/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.factories
index ac5e856..9743fcc 100644
--- a/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.factories
+++ b/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.factories
@@ -1,4 +1,7 @@
 org.springframework.boot.autoconfigure.EnableAutoConfiguration = \
+  org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration,\
+  org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration,\
+  org.apache.shiro.spring.config.web.autoconfigure.ShiroWebMvcAutoConfiguration,\
   org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration,\
   org.apache.shiro.spring.boot.autoconfigure.ShiroAutoConfiguration,\
   org.apache.shiro.spring.boot.autoconfigure.ShiroAnnotationProcessorAutoConfiguration
diff --git a/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.provides b/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.provides
index 1749212..d9b5251 100644
--- a/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.provides
+++ b/support/spring-boot/spring-boot-starter/src/main/resources/META-INF/spring.provides
@@ -1 +1 @@
-provides: shiro
\ No newline at end of file
+provides: shiro,shiro-web
\ No newline at end of file
diff --git a/support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ConfiguredGlobalFiltersTest.groovy b/support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ConfiguredGlobalFiltersTest.groovy
similarity index 100%
rename from support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ConfiguredGlobalFiltersTest.groovy
rename to support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ConfiguredGlobalFiltersTest.groovy
diff --git a/support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/DisabledGlobalFiltersTest.groovy b/support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/DisabledGlobalFiltersTest.groovy
similarity index 100%
rename from support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/DisabledGlobalFiltersTest.groovy
rename to support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/DisabledGlobalFiltersTest.groovy
diff --git a/support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ShiroWebSpringAutoConfigurationTest.groovy b/support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ShiroWebSpringAutoConfigurationTest.groovy
similarity index 100%
rename from support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ShiroWebSpringAutoConfigurationTest.groovy
rename to support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/ShiroWebSpringAutoConfigurationTest.groovy
diff --git a/support/spring-boot/spring-boot-web-starter/src/test/java/org/apache/shiro/spring/boot/autoconfigure/web/application/ShiroWebAutoConfigurationTestApplication.java b/support/spring-boot/spring-boot-starter/src/test/java/org/apache/shiro/spring/boot/autoconfigure/web/application/ShiroWebAutoConfigurationTestApplication.java
similarity index 100%
rename from support/spring-boot/spring-boot-web-starter/src/test/java/org/apache/shiro/spring/boot/autoconfigure/web/application/ShiroWebAutoConfigurationTestApplication.java
rename to support/spring-boot/spring-boot-starter/src/test/java/org/apache/shiro/spring/boot/autoconfigure/web/application/ShiroWebAutoConfigurationTestApplication.java
diff --git a/support/spring-boot/spring-boot-web-starter/pom.xml b/support/spring-boot/spring-boot-web-starter/pom.xml
index 0a69002..4af32ae 100644
--- a/support/spring-boot/spring-boot-web-starter/pom.xml
+++ b/support/spring-boot/spring-boot-web-starter/pom.xml
@@ -60,29 +60,10 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter</artifactId>
-            <version>${spring-boot.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
-            <version>${spring-boot.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
-            <scope>test</scope>
         </dependency>
 
     </dependencies>
diff --git a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/NOTICE b/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 9d26a95..0000000
--- a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,15 +0,0 @@
-Apache Shiro
-Copyright 2008-2020 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-The implementation for org.apache.shiro.util.SoftHashMap is based 
-on initial ideas from Dr. Heinz Kabutz's publicly posted version 
-available at http://www.javaspecialists.eu/archive/Issue015.html,
-with continued modifications.  
-
-Certain parts (StringUtils, IpAddressMatcher, etc.) of the source
-code for this  product was copied for simplicity and to reduce
-dependencies  from the source code developed by the Spring Framework
-Project  (http://www.springframework.org).
diff --git a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
deleted file mode 100644
index ff13832..0000000
--- a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
-  "groups": [
-    {
-      "name": "shiro"
-    }
-  ],
-  "properties": [
-
-    {
-      "name": "shiro.web.enabled",
-      "type": "java.lang.Boolean",
-      "description": "A boolean flag that can disable all Shiro Spring Boot starters.  This is mostly useful during testing or debugging, or if you want to compare behavior when Shiro is enabled or disabled.",
-      "defaultValue": true
-    },
-    {
-      "name": "shiro.loginUrl",
-      "type": "java.lang.String",
-      "description": "The application's login URL to be assigned to all acquired Filters that subclass AccessControlFilter or 'null' if no value should be assigned globally.",
-      "defaultValue": "/login.jsp"
-    },
-    {
-      "name": "shiro.successUrl",
-      "type": "java.lang.String",
-      "description": "The application's after-login success URL to be assigned to all acquired Filters that subclass AuthenticationFilter or null if no value should be assigned globally.",
-      "defaultValue": "/"
-    },
-    {
-      "name": "shiro.unauthorizedUrl",
-      "type": "java.lang.String",
-      "description": "The application's 'unauthorized' URL to apply to as a convenience to all discovered AuthorizationFilter instances.",
-      "defaultValue": null
-    },
-    {
-      "name": "shiro.sessionManager.sessionIdCookieEnabled",
-      "type": "java.lang.String",
-      "description": "Enable or disable session tracking via a cookie.",
-      "defaultValue": true
-    },
-    {
-      "name": "shiro.sessionManager.sessionIdUrlRewritingEnabled",
-      "type": "java.lang.String",
-      "description": "Enable or disable session tracking via a URL parameter.  If your site requires cookies, it is recommended you disable this.",
-      "defaultValue": true
-    }
-  ]
-}
\ No newline at end of file
diff --git a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/spring.factories b/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 1546fc1..0000000
--- a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,4 +0,0 @@
-org.springframework.boot.autoconfigure.EnableAutoConfiguration = \
-  org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration,\
-  org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration,\
-  org.apache.shiro.spring.config.web.autoconfigure.ShiroWebMvcAutoConfiguration
diff --git a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/spring.provides b/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/spring.provides
deleted file mode 100644
index ffe94a1..0000000
--- a/support/spring-boot/spring-boot-web-starter/src/main/resources/META-INF/spring.provides
+++ /dev/null
@@ -1 +0,0 @@
-provides: shiro-web
\ No newline at end of file
diff --git a/support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/WebSpringFactoriesTest.groovy b/support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/WebSpringFactoriesTest.groovy
deleted file mode 100644
index 491bc0a..0000000
--- a/support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/WebSpringFactoriesTest.groovy
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.shiro.spring.boot.autoconfigure.web
-
-import org.junit.Test
-
-import static org.hamcrest.MatcherAssert.assertThat
-import static org.hamcrest.Matchers.matchesPattern
-import static org.hamcrest.Matchers.not
-
-class WebSpringFactoriesTest {
-
-    @Test
-    void springFactoriesConfigContainsNoWhitespace() {
-        Properties props = new Properties()
-        props.load(new FileReader("src/main/resources/META-INF/spring.factories"))
-        assertNoWhitespaceInEntries(props)
-    }
-
-    static private assertNoWhitespaceInEntries(Properties props) {
-        props.each{ key, val ->
-            assertThat "Property [${key}] contains whitespace",
-            props.get("org.springframework.boot.autoconfigure.EnableAutoConfiguration"), not(matchesPattern(".*\\s.*"))
-        }
-    }
-}