Skip to content
Snippets Groups Projects
Commit 5cfd482e authored by Mic's avatar Mic
Browse files

removed default profile and replaced with "jpa"

parent ea81fe07
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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>
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment