You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bm...@apache.org on 2020/11/22 11:58:14 UTC
[shiro] branch 1.7.x updated (3bd10d3 -> c539537)
This is an automated email from the ASF dual-hosted git repository.
bmarwell pushed a change to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/shiro.git.
from 3bd10d3 [maven-release-plugin] prepare for next development iteration
new 5f367c3 hotfix springboot spring.factories
new c539537 Add basic tests to assert no whitespace in spring.factories fiels
The 2 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.
Summary of changes:
.../boot/autoconfigure/SpringFactoriesTest.groovy | 24 ++++++++++++++++++++++
.../src/main/resources/META-INF/spring.factories | 2 +-
.../web/WebSpringFactoriesTest.groovy | 24 ++++++++++++++++++++++
3 files changed, 49 insertions(+), 1 deletion(-)
create mode 100644 support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/SpringFactoriesTest.groovy
create mode 100644 support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/WebSpringFactoriesTest.groovy
[shiro] 02/02: Add basic tests to assert no whitespace in
spring.factories fiels
Posted by bm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bmarwell pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/shiro.git
commit c539537ab90f56fdb38066e7177184b189106015
Author: Brian Demers <bd...@apache.org>
AuthorDate: Mon Nov 9 14:18:04 2020 -0500
Add basic tests to assert no whitespace in spring.factories fiels
---
.../boot/autoconfigure/SpringFactoriesTest.groovy | 24 ++++++++++++++++++++++
.../web/WebSpringFactoriesTest.groovy | 24 ++++++++++++++++++++++
2 files changed, 48 insertions(+)
diff --git a/support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/SpringFactoriesTest.groovy b/support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/SpringFactoriesTest.groovy
new file mode 100644
index 0000000..43dba27
--- /dev/null
+++ b/support/spring-boot/spring-boot-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/SpringFactoriesTest.groovy
@@ -0,0 +1,24 @@
+package org.apache.shiro.spring.boot.autoconfigure
+
+import org.junit.Test
+
+import static org.hamcrest.MatcherAssert.assertThat
+import static org.hamcrest.Matchers.matchesPattern
+import static org.hamcrest.Matchers.not
+
+class SpringFactoriesTest {
+
+ @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.*"))
+ }
+ }
+}
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
new file mode 100644
index 0000000..b0892a1
--- /dev/null
+++ b/support/spring-boot/spring-boot-web-starter/src/test/groovy/org/apache/shiro/spring/boot/autoconfigure/web/WebSpringFactoriesTest.groovy
@@ -0,0 +1,24 @@
+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.*"))
+ }
+ }
+}
[shiro] 01/02: hotfix springboot spring.factories
Posted by bm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bmarwell pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/shiro.git
commit 5f367c334bce6dc4d7b8525630a43e726f1dd28e
Author: 张博 <60...@qq.com>
AuthorDate: Thu Nov 5 00:21:09 2020 +0800
hotfix springboot spring.factories
---
.../src/main/resources/META-INF/spring.factories | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
index 328062d..1546fc1 100644
--- 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
@@ -1,4 +1,4 @@
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.ShiroWebFilterConfiguration,\
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebMvcAutoConfiguration