From 0c2665f1b4585de0eaae2e6276d07a1fafe3a208 Mon Sep 17 00:00:00 2001 From: Mic Date: Mon, 14 Jan 2013 23:36:06 +0800 Subject: [PATCH] added bean profiles for jdbc/jpa --- .springBeans | 2 +- ...ext-jpa.xml => applicationContext-dao.xml} | 83 ++++++++++++------- .../spring/applicationContext-jdbc.xml | 64 -------------- src/main/webapp/WEB-INF/web.xml | 7 +- .../aspects/UsageLogAspectTests.java | 4 +- .../petclinic/jdbc/JdbcClinicTests.java | 6 +- .../samples/petclinic/jpa/JpaClinicTests.java | 16 +--- 7 files changed, 69 insertions(+), 113 deletions(-) rename src/main/resources/spring/{applicationContext-jpa.xml => applicationContext-dao.xml} (50%) delete mode 100644 src/main/resources/spring/applicationContext-jdbc.xml diff --git a/.springBeans b/.springBeans index f88ad9b6d..1a6ad9c3f 100644 --- a/.springBeans +++ b/.springBeans @@ -8,7 +8,7 @@ src/main/resources/spring/applicationContext-dataSource.xml - src/main/resources/spring/applicationContext-jpa.xml + src/main/resources/spring/applicationContext-dao.xml diff --git a/src/main/resources/spring/applicationContext-jpa.xml b/src/main/resources/spring/applicationContext-dao.xml similarity index 50% rename from src/main/resources/spring/applicationContext-jpa.xml rename to src/main/resources/spring/applicationContext-dao.xml index 6a9c86538..bcf2df623 100644 --- a/src/main/resources/spring/applicationContext-jpa.xml +++ b/src/main/resources/spring/applicationContext-dao.xml @@ -21,25 +21,6 @@ - - - - - - - - org/springframework/samples/petclinic - - - - - - - - + - - + + - - + + + + + + + + + org/springframework/samples/petclinic + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/spring/applicationContext-jdbc.xml b/src/main/resources/spring/applicationContext-jdbc.xml deleted file mode 100644 index 7456dbc9b..000000000 --- a/src/main/resources/spring/applicationContext-jdbc.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index b8dad078f..75ba1b90b 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -15,7 +15,10 @@ petclinic.root - + + spring.profiles.active + jdbc + contextConfigLocation - classpath:spring/applicationContext-jdbc.xml + classpath:spring/applicationContext-dao.xml