Changeset 33397 for lang/java

Show
Ignore:
Timestamp:
05/18/09 18:20:05 (6 years ago)
Author:
rikeda
Message:

JUnitテストケースを利用できるようSpringの設定ファイルをクラスパス上に変更。

Location:
lang/java/misc/ssh-blank
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • lang/java/misc/ssh-blank/pom.xml

    r33225 r33397  
    7171            <groupId>junit</groupId> 
    7272            <artifactId>junit</artifactId> 
    73             <version>3.8.1</version> 
     73            <version>4.6</version> 
     74            <scope>test</scope> 
     75        </dependency> 
     76        <dependency> 
     77            <groupId>org.springframework</groupId> 
     78            <artifactId>spring-test</artifactId> 
     79            <version>2.5.6</version> 
    7480            <scope>test</scope> 
    7581        </dependency> 
  • lang/java/misc/ssh-blank/src/main/webapp/WEB-INF/applicationContext.xml

    r33225 r33397  
    22<beans xmlns="http://www.springframework.org/schema/beans" 
    33        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    4         xmlns:aop="http://www.springframework.org/schema/aop" 
    5         xmlns:tx="http://www.springframework.org/schema/tx" 
    64        xsi:schemaLocation="http://www.springframework.org/schema/beans 
    7                             http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
    8                             http://www.springframework.org/schema/aop 
    9                             http://www.springframework.org/schema/aop/spring-aop-2.1.xsd 
    10                             http://www.springframework.org/schema/tx 
    11                             http://www.springframework.org/schema/tx/spring-tx-2.0.xsd" 
    12         default-autowire="byName" default-lazy-init="true"> 
     5                            http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 
    136 
    14     <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> 
    15         <property name="persistenceUnitName" value="persistenceUnit"/> 
    16     </bean> 
    17  
    18     <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"/> 
    19  
    20     <aop:config> 
    21         <aop:pointcut id="tracePointcut" expression="execution(* org.coderepos..*(..))"/> 
    22         <aop:advisor pointcut-ref="tracePointcut" advice-ref="traceInterceptor"/> 
    23     </aop:config> 
    24  
    25     <aop:config> 
    26         <aop:pointcut id="transactionPointcut" expression="execution(* org.coderepos.dao..*(..))" /> 
    27         <aop:advisor pointcut-ref="transactionPointcut" advice-ref="transactionAdvice"/> 
    28     </aop:config> 
    29  
    30     <tx:advice id="transactionAdvice" transaction-manager="transactionManager"> 
    31         <tx:attributes> 
    32             <tx:method name="find*" read-only="true" /> 
    33             <tx:method name="*" /> 
    34         </tx:attributes> 
    35     </tx:advice> 
    36  
    37     <bean id="traceInterceptor" class="org.springframework.aop.interceptor.CustomizableTraceInterceptor"> 
    38         <property name="useDynamicLogger" value="true"/> 
    39     </bean> 
    40  
    41     <bean name="/index" class="org.coderepos.action.EmpAction"/> 
    42     <bean id="empDao" class="org.coderepos.dao.impl.EmpDaoImpl"/> 
     7    <import resource="classpath:beans.xml"/> 
    438 
    449</beans>