Revision 46876
Added by Claudio Atzori about 7 years ago
applicationContext-dnet-datasource-publisher.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
3 | 3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" |
4 |
xmlns:util="http://www.springframework.org/schema/util" xmlns:cache="http://www.springframework.org/schema/cache" |
|
5 |
xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:template="http://dnetlib.eu/springbeans/template" |
|
4 |
xmlns:jpa="http://www.springframework.org/schema/data/jpa" |
|
5 |
xmlns:util="http://www.springframework.org/schema/util" xmlns:cache="http://www.springframework.org/schema/cache" |
|
6 |
xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:template="http://dnetlib.eu/springbeans/template" |
|
7 |
xmlns:tx="http://www.springframework.org/schema/tx" |
|
6 | 8 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
7 |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd |
|
8 |
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd |
|
9 |
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> |
|
9 |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd |
|
10 |
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd |
|
11 |
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd |
|
12 |
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd |
|
13 |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> |
|
10 | 14 |
|
11 | 15 |
<bean id="datasourceInfoRetriever" class="eu.dnetlib.datasource.publisher.clients.DatasourceInfoRetriever" /> |
12 | 16 |
|
13 | 17 |
<bean id="datasourceIndexClient" class="eu.dnetlib.datasource.publisher.clients.DatasourceIndexClient" /> |
14 | 18 |
|
15 |
<bean id="isLookupClient" class="eu.dnetlib.datasource.publisher.clients.ISLookupClient" />
|
|
19 |
<bean id="datasourceIsLookupClient" class="eu.dnetlib.datasource.publisher.clients.ISLookupClient" />
|
|
16 | 20 |
|
17 | 21 |
<bean id="mongoLoggerClient" class="eu.dnetlib.datasource.publisher.clients.MongoLoggerClient" /> |
18 | 22 |
|
... | ... | |
29 | 33 |
</constructor-arg> |
30 | 34 |
</bean> |
31 | 35 |
|
32 |
<bean id="jdbcApiDao" class="eu.dnetlib.datasource.publisher.clients.JdbcDatasourceDao" />
|
|
36 |
<jpa:repositories base-package="eu.dnetlib.datasource.publisher.repository"/>
|
|
33 | 37 |
|
34 |
<bean id="dsDataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close" |
|
35 |
p:driverClassName="org.postgresql.Driver" |
|
36 |
p:url="${datasource.publisher.jdbc.url}" |
|
37 |
p:username="${datasource.publisher.jdbc.user}" |
|
38 |
p:password="${datasource.publisher.jdbc.pwd}" |
|
39 |
p:minIdle="${datasource.publisher.jdbc.minIdle}" |
|
40 |
p:maxIdle="${datasource.publisher.jdbc.maxIdle}"/> |
|
38 |
<!-- DATASOURCE --> |
|
39 |
<bean id="dsDataSource" |
|
40 |
class="org.springframework.jdbc.datasource.DriverManagerDataSource" |
|
41 |
p:driverClassName="org.postgresql.Driver" p:url="${datasource.publisher.jdbc.url}" |
|
42 |
p:username="${datasource.publisher.jdbc.user}" p:password="${datasource.publisher.jdbc.pwd}" /> |
|
41 | 43 |
|
44 |
<bean id="entityManagerFactory" |
|
45 |
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
|
46 |
<property name="packagesToScan" value="eu.dnetlib.datasource.publisher.model.db" /> |
|
47 |
<property name="dataSource" ref="dsDataSource" /> |
|
48 |
|
|
49 |
<property name="jpaProperties"> |
|
50 |
<props> |
|
51 |
<prop key="hibernate.show_sql">false</prop> |
|
52 |
<prop key="hibernate.hbm2ddl.auto">validate</prop> |
|
53 |
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQL9Dialect</prop> |
|
54 |
</props> |
|
55 |
</property> |
|
56 |
|
|
57 |
<property name="persistenceProvider"> |
|
58 |
<bean class="org.hibernate.jpa.HibernatePersistenceProvider"></bean> |
|
59 |
</property> |
|
60 |
</bean> |
|
61 |
|
|
62 |
<tx:annotation-driven transaction-manager="transactionManager" /> |
|
63 |
|
|
64 |
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" |
|
65 |
p:entityManagerFactory-ref="entityManagerFactory" |
|
66 |
p:dataSource-ref="dsDataSource" |
|
67 |
p:jpaDialect-ref="jpaDialect"/> |
|
68 |
|
|
69 |
<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /> |
|
70 |
|
|
42 | 71 |
<bean id="datasourceCacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" |
43 | 72 |
p:cache-manager-ref="datasourceCache" /> |
44 | 73 |
|
Also available in: Unified diff
cleanup, added method to search among apis