Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <hibernate-configuration>
- <session-factory>
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.generate_statistics">true</property>
- <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
- <property name="hibernate.connection.datasource">jdbc:mysql://localhost/easywordweb</property>
- <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
- <property name="hibernate.connection.url">jdbc:mysql://localhost/easywordweb</property>
- <property name="hibernate.connection.username">username</property>
- <property name="hibernate.connection.password">password</property>
- <!--<property name="hibernate.connection.pool_size">140</property>-->
- <!--<property name="hibernate.c3p0.max_size">140</property>-->
- <property name="hibernate.c3p0.max_size">9</property>
- <property name="hibernate.c3p0.min_size">5</property>
- <property name="hibernate.c3p0.acquire_increment">3</property>
- <!--max to cache-->
- <property name="hibernate.c3p0.max_statements">50</property>
- <!--The seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire. Hibernate default: 0-->
- <property name="hibernate.c3p0.timeout">40</property>
- <!--<property name="hibernate.c3p0.validate">true</property>-->
- <!--<property name="hibernate.c3p0.preferredTestQuery">SELECT 1;</property>-->
- <!--for test, change futher-->
- <!---->
- <!--at every connection checkin to verify that the connection is valid-->
- <!--<property name="hibernate.c3p0.testConnectionOnCheckout">true</property>-->
- <!--at every connection checkout to verify that the connection is valid-->
- <!--<property name="hibernate.c3p0.testConnectionOnCheckin">true</property>-->
- <!--/for test, change futher-->
- <property name="hibernate.connection.provider_class">org.hibernate.c3p0.internal.C3P0ConnectionProvider</property>
- <property name="hibernate.jdbc.batch_size">20</property>
- <!--Number rows to be returned if no setted-->
- <property name="hibernate.jdbc.fetch_size">20</property>
- <property name="hibernate.jdbc.use_get_generated_keys">true</property>
- <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
- <!--FIXING: Table "...".hibernate_sequence table not found.-->
- <property name="hibernate.id.new_generator_mappings">false</property>
- </session-factory>
- </hibernate-configuration>
- com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getPoolManager
- Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@11c5be52
- [
- connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@87645e0f
- [
- acquireIncrement -> 3,
- acquireRetryAttempts -> 30,
- acquireRetryDelay -> 1000,
- autoCommitOnClose -> false,
- automaticTestTable -> null,
- breakAfterAcquireFailure -> false,
- checkoutTimeout -> 0,
- connectionCustomizerClassName -> null,
- connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester,
- debugUnreturnedConnectionStackTraces -> false,
- factoryClassLocation -> null,
- forceIgnoreUnresolvedTransactions -> false,
- identityToken -> valididentitytokenhere,
- idleConnectionTestPeriod -> 0,
- initialPoolSize -> 5,
- maxAdministrativeTaskTime -> 0,
- maxConnectionAge -> 0,
- maxIdleTime -> 40,
- maxIdleTimeExcessConnections -> 0,
- maxPoolSize -> 9,
- maxStatements -> 50,
- maxStatementsPerConnection -> 0,
- minPoolSize -> 5,
- nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@82d61130
- [
- description -> null,
- driverClass -> null,
- factoryClassLocation -> null,
- identityToken -> valididentitytokenhere,
- jdbcUrl -> jdbc:mysql://localhost/easywordweb,
- properties -> { user=******, password=******}
- ],
- preferredTestQuery -> null,
- propertyCycle -> 0,
- statementCacheNumDeferredCloseThreads -> 0,
- testConnectionOnCheckin -> false,
- testConnectionOnCheckout -> false,
- unreturnedConnectionTimeout -> 0,
- usesTraditionalReflectiveProxies -> false;
- userOverrides: {}
- ],
- dataSourceName -> null,
- factoryClassLocation -> null,
- identityToken -> valididentitytokenhere,
- numHelperThreads -> 3
- ]
- <beans
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:cache="http://www.springframework.org/schema/cache"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:security="http://www.springframework.org/schema/security"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"
- xmlns:mvc="http://www.springframework.org/schema/mvc">
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix">
- <value>/views/</value>
- </property>
- <property name="suffix">
- <value>.jsp</value>
- </property>
- </bean>
- <bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
- <property name="packagesToScan" value="milkiv.easyword.models"/>
- <property name="configLocations">
- <value>classpath:resources/hibernate.cfg.xml</value>
- </property>
- </bean>
- <bean class="org.springframework.orm.hibernate5.HibernateTemplate">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
- <bean class="milkiv.easyword.service.JsonConverter"></bean>
- <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
- <mvc:resources mapping="/resources/**" location="/resources/"/>
- <context:annotation-config/>
- <context:component-scan base-package="milkiv.easyword"/>
- <tx:annotation-driven/>
- <mvc:annotation-driven>
- <mvc:argument-resolvers>
- <bean class="org.springframework.security.web.method.annotation.AuthenticationPrincipalArgumentResolver" />
- </mvc:argument-resolvers>
- </mvc:annotation-driven>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement