From 3cb402ced71073a70875cc770e2abc47b0e9ef5e Mon Sep 17 00:00:00 2001 From: marcodenisi Date: Thu, 18 Jun 2020 17:58:25 +0200 Subject: [PATCH] BAEL-4083 - removed sample with xml context-config --- .../SpringBootXmlApplication.java | 6 ++--- .../SpringBootXmlWithConfigApplication.java | 23 ------------------- .../src/main/resources/beansconf.xml | 15 ------------ 3 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlWithConfigApplication.java delete mode 100644 spring-boot-modules/spring-boot-xml/src/main/resources/beansconf.xml diff --git a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java b/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java index 1a0350fd26..bd75a95d7d 100644 --- a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java +++ b/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java @@ -3,12 +3,10 @@ package com.baeldung.springbootxml; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.context.annotation.Configuration; +import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ImportResource; -@Configuration -@EnableAutoConfiguration +@SpringBootApplication @ImportResource("classpath:beans.xml") public class SpringBootXmlApplication implements CommandLineRunner { diff --git a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlWithConfigApplication.java b/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlWithConfigApplication.java deleted file mode 100644 index 7c36ac7905..0000000000 --- a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlWithConfigApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.baeldung.springbootxml; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.ImportResource; - -@Configuration -@ImportResource("classpath:beansconf.xml") -public class SpringBootXmlWithConfigApplication implements CommandLineRunner { - - @Autowired private Pojo pojo; - - public static void main(String[] args) { - SpringApplication.run(SpringBootXmlWithConfigApplication.class, args); - } - - @Override - public void run(String... args) throws Exception { - System.out.println(pojo.getField()); - } -} diff --git a/spring-boot-modules/spring-boot-xml/src/main/resources/beansconf.xml b/spring-boot-modules/spring-boot-xml/src/main/resources/beansconf.xml deleted file mode 100644 index 7f328370a8..0000000000 --- a/spring-boot-modules/spring-boot-xml/src/main/resources/beansconf.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - \ No newline at end of file