From efd0f917b54d4dddec8d99300f6716a2e13f4604 Mon Sep 17 00:00:00 2001 From: Frank Delporte Date: Thu, 13 Jun 2024 18:09:11 +0200 Subject: [PATCH] Fully remove contextconditions --- .../com/pi4j/spring/boot/sample/app/Application.java | 2 ++ .../java/com/pi4j/spring/boot/ContextConditions.java | 11 ----------- .../com/pi4j/spring/boot/ContextConfiguration.java | 2 -- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConditions.java diff --git a/pi4j-spring-boot-starter-sample-app/src/main/java/com/pi4j/spring/boot/sample/app/Application.java b/pi4j-spring-boot-starter-sample-app/src/main/java/com/pi4j/spring/boot/sample/app/Application.java index a2803fb..fa40dc3 100644 --- a/pi4j-spring-boot-starter-sample-app/src/main/java/com/pi4j/spring/boot/sample/app/Application.java +++ b/pi4j-spring-boot-starter-sample-app/src/main/java/com/pi4j/spring/boot/sample/app/Application.java @@ -6,6 +6,8 @@ @SpringBootApplication public class Application { + // Expose with ngrok: `ngrok http --domain=pi4j.ngrok.dev 8080` + public static void main(String[] args) { SpringApplication.run(Application.class, args); } diff --git a/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConditions.java b/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConditions.java deleted file mode 100644 index 9f42844..0000000 --- a/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConditions.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.pi4j.spring.boot; - -import org.springframework.boot.autoconfigure.condition.AnyNestedCondition; - -public class ContextConditions extends AnyNestedCondition { - - public ContextConditions() { - super(ConfigurationPhase.REGISTER_BEAN); - } - -} diff --git a/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java b/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java index f12bbe7..67cae8d 100644 --- a/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java +++ b/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java @@ -18,7 +18,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; @Configuration(proxyBeanMethods = false) @@ -50,7 +49,6 @@ public ContextConfiguration() { } @Bean - @Conditional(ContextConditions.class) @ConditionalOnMissingBean Context context() { return pi4j;