BAEL-4083 - sample spring boot app with xml config and properties

This commit is contained in:
marcodenisi
2020-06-18 17:49:10 +02:00
parent e28040a475
commit 333dad149f
8 changed files with 127 additions and 0 deletions
@@ -0,0 +1 @@
sample=string loaded from properties!
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<bean class="com.baeldung.springbootxml.Pojo">
<property name="field" value="${sample}"></property>
</bean>
</beans>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:property-placeholder location="classpath:application.properties"/>
<bean class="com.baeldung.springbootxml.Pojo">
<property name="field" value="${sample}"></property>
</bean>
</beans>