From 5cfd482edc474587cf2965750b936ee2ce871b4e Mon Sep 17 00:00:00 2001
From: Mic <misvy@vmware.com>
Date: Mon, 16 Dec 2013 20:58:15 +0900
Subject: [PATCH] removed default profile and replaced with "jpa"

---
 src/main/resources/spring/business-config.xml               | 6 +++---
 src/main/webapp/WEB-INF/web.xml                             | 5 ++---
 .../samples/petclinic/service/ClinicServiceJpaTests.java    | 3 ++-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/resources/spring/business-config.xml b/src/main/resources/spring/business-config.xml
index 5e9dc68..99cf4c1 100644
--- a/src/main/resources/spring/business-config.xml
+++ b/src/main/resources/spring/business-config.xml
@@ -27,12 +27,12 @@
  
 	
 	<!-- ==================		 3 Profiles to choose from 			=================== 
-									- default (uses JPA)
 									- jdbc (uses Spring" JdbcTemplate)
+									- jpa
 									- spring-data-jpa	
 		  =============================================================================-->
 	
-    <beans profile="default,spring-data-jpa">
+    <beans profile="jpa,spring-data-jpa">
         <!-- JPA EntityManagerFactory -->
         <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
               p:dataSource-ref="dataSource">
@@ -80,7 +80,7 @@
         <context:component-scan base-package="org.springframework.samples.petclinic.repository.jdbc"/>
     </beans>
 
-    <beans profile="default">
+    <beans profile="jpa">
         <!--
             Loads JPA beans
             Will automatically be transactional due to @Transactional.
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index a70f381..e080b6e 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -10,11 +10,10 @@ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
     
     <context-param>
         <param-name>spring.profiles.active</param-name>
-        <param-value>default</param-value>
+        <param-value>jpa</param-value>
     </context-param>
 
-   <!-- Default profile is "jpa" (see business-config.xml for more details). 
-   When using Spring JDBC, uncomment the following: -->
+   <!-- When using Spring JDBC, use the following: -->
    <!--  <context-param>
         <param-name>spring.profiles.active</param-name>
         <param-value>jdbc</param-value>
diff --git a/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceJpaTests.java b/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceJpaTests.java
index 2512372..e024f21 100644
--- a/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceJpaTests.java
+++ b/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceJpaTests.java
@@ -2,6 +2,7 @@
 package org.springframework.samples.petclinic.service;
 
 import org.junit.runner.RunWith;
+import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -16,7 +17,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @ContextConfiguration(locations = {"classpath:spring/business-config.xml"})
 @RunWith(SpringJUnit4ClassRunner.class)
-// No active profile specificied because JPA uses the "default" profile
+@ActiveProfiles("jpa")
 public class ClinicServiceJpaTests extends AbstractClinicServiceTests {
 
 }
\ No newline at end of file
-- 
GitLab