Advertisement
Guest User

Untitled

a guest
Mar 10th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.35 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.       xmlns:context="http://www.springframework.org/schema/context"
  5.       xmlns:security="http://www.springframework.org/schema/security"
  6.       xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:tx="http://www.springframework.org/schema/tx"
  7.       xmlns:jpa="http://www.springframework.org/schema/data/jpa"
  8.       xsi:schemaLocation="http://www.springframework.org/schema/beans
  9. http://www.springframework.org/schema/beans/spring-beans.xsd
  10. http://www.springframework.org/schema/context
  11. http://www.springframework.org/schema/context/spring-context-4.0.xsd
  12. http://www.springframework.org/schema/security
  13. http://www.springframework.org/schema/security/spring-security-3.2.xsd
  14. http://www.springframework.org/schema/mvc
  15. http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
  16.     <mvc:annotation-driven enable-matrix-variables="true"/>
  17.     <mvc:resources location="/resources/" mapping="/resource/**"/>
  18.     <context:component-scan base-package="com.virnikandrapid.microblog"/>
  19.     <security:global-method-security secured-annotations="enabled" />
  20.     <bean
  21.            class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  22.         <property name="prefix" value="/WEB-INF/views/"/>
  23.         <property name="suffix" value=".jsp"/>
  24.     </bean>
  25.     <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
  26.         <property name="basename" value="messages"/>
  27.     </bean>
  28.     <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
  29.         <property name="maxUploadSize" value="10240000"/>
  30.     </bean>
  31.     <bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
  32.         <property name="viewClass" value="org.springframework.web.servlet.view.tiles3.TilesView"/>
  33.         <property name="order" value="-2"/>
  34.     </bean>
  35.     <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
  36.         <property name="definitions">
  37.             <list>
  38.                 <value>/WEB-INF/tiles/definition/tile-definition.xml</value>
  39.             </list>
  40.         </property>
  41.     </bean>
  42.  
  43.     <!--  hibernate, baza danych -->
  44.  
  45.     <jpa:repositories base-package="com.virnikandrapid.microblog.domain.repository"/>
  46.     <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  47.         <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  48.         <property name="url" value="jdbc:mysql://robson1.me:3306/amel3?characterEncoding=UTF-8"/>
  49.         <property name="username" value="amel"/>
  50.         <property name="password" value="amel123"/>
  51.     </bean>
  52.     <tx:annotation-driven/>
  53.     <bean id="entityManagerFactory"
  54.          class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
  55.         <property name="dataSource" ref="dataSource"/>
  56.         <property name="packagesToScan" value="com.virnikandrapid.microblog.domain"/>
  57.         <property name="jpaVendorAdapter">
  58.             <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
  59.                 <property name="showSql" value="true"/>
  60.                 <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect"/>
  61.             </bean>
  62.         </property>
  63.         <property name="jpaProperties">
  64.             <props>
  65.                 <prop key="hibernate.hbm2ddl.auto">update</prop>
  66.                 <prop key="hibernate.connection.characterEncoding">UTF-8</prop>
  67.                 <prop key="hibernate.connection.useUnicode">true</prop>
  68.             </props>
  69.         </property>
  70.     </bean>
  71.     <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
  72.     <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
  73.     <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
  74.         <property name="entityManagerFactory" ref="entityManagerFactory"/>
  75.     </bean>
  76.     <!-- heuheuehu -->
  77. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement