Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <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:security="http://www.springframework.org/schema/security"
- xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:jpa="http://www.springframework.org/schema/data/jpa"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-4.0.xsd
- http://www.springframework.org/schema/security
- http://www.springframework.org/schema/security/spring-security-3.2.xsd
- http://www.springframework.org/schema/mvc
- 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">
- <mvc:annotation-driven enable-matrix-variables="true"/>
- <mvc:resources location="/resources/" mapping="/resource/**"/>
- <context:component-scan base-package="com.virnikandrapid.microblog"/>
- <security:global-method-security secured-annotations="enabled" />
- <bean
- class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/views/"/>
- <property name="suffix" value=".jsp"/>
- </bean>
- <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
- <property name="basename" value="messages"/>
- </bean>
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
- <property name="maxUploadSize" value="10240000"/>
- </bean>
- <bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
- <property name="viewClass" value="org.springframework.web.servlet.view.tiles3.TilesView"/>
- <property name="order" value="-2"/>
- </bean>
- <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
- <property name="definitions">
- <list>
- <value>/WEB-INF/tiles/definition/tile-definition.xml</value>
- </list>
- </property>
- </bean>
- <!-- hibernate, baza danych -->
- <jpa:repositories base-package="com.virnikandrapid.microblog.domain.repository"/>
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://robson1.me:3306/amel3?characterEncoding=UTF-8"/>
- <property name="username" value="amel"/>
- <property name="password" value="amel123"/>
- </bean>
- <tx:annotation-driven/>
- <bean id="entityManagerFactory"
- class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="dataSource" ref="dataSource"/>
- <property name="packagesToScan" value="com.virnikandrapid.microblog.domain"/>
- <property name="jpaVendorAdapter">
- <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
- <property name="showSql" value="true"/>
- <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect"/>
- </bean>
- </property>
- <property name="jpaProperties">
- <props>
- <prop key="hibernate.hbm2ddl.auto">update</prop>
- <prop key="hibernate.connection.characterEncoding">UTF-8</prop>
- <prop key="hibernate.connection.useUnicode">true</prop>
- </props>
- </property>
- </bean>
- <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
- <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
- <!-- heuheuehu -->
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement