三大框架(ssh)整合之配置檔案
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:tool="http://www.springframework.org/schema/tool"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/tool
http://www.springframework.org/schema/tool/spring-tool-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
">
<!--開啟spring註解開發-->
<context:component-scan base-package="com.wuhan.bos"/>
<!--載入jdbc配置檔案-->
<context:property-placeholder location="classpath:jdbc.properties"/>
<!--開啟事務註解-->
<tx:annotation-driven transaction-manager="txManager"/>
<bean id="txManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!--工廠bean (已經整合了hibernate)-->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">false</prop>
</props>
</property>
<!--配置hibernate對映-->
<property name="mappingDirectoryLocations">
<list>
<value>classpath:com/wuhan/bos/domain</value>
</list>
</property>
</bean>
<!-- c3p0資料來源 dataSource -->
<bean id="dataSource"class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${driverClass}"></property>
<property name="jdbcUrl" value="${jdbcUrl}"></property>
<property name="user" value="${user}"></property>
<property name="password" value="${password}"></property>
</bean>
<!--遠端呼叫服務-->
<bean id="customerService"
class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
<property name="serviceInterface" value="cn.itcast.crm.service.CustomerService"/>
<property name="serviceUrl" value="http://localhost:8080/crm/remoting/customer"></property>
</bean>
</beans>
相關推薦
三大框架(ssh)整合之配置檔案
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
SSH整合之配置檔案
來自:http://www.cnblogs.com/luoyun/archive/2013/01/03/2843322.html 為web應用提供Struts2支援 1.編輯web應用的web.xml配置檔案,配置Struts2的核心Filter來攔截使用者請求。
最新的三大框架整合之配置檔案詳解
一:spring.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://
[ssh] spring-springmvc-hibernate整合之配置檔案
1.web.xml檔案: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:
SSH框架整合的MAVEN專案之配置檔案整合
在最近的SSH框架知識回顧之後,整合了一些所需的配置檔案,並將配置檔案中的配置項記錄下來,避免在以後的開發中進行重複性編碼 首先是web專案的核心配置檔案 web.xml <?xml version="1.0" encoding="UTF-8"?&
三大框架(ssh)學習——配置檔案詳解(一)
配置檔案詳解 指定web應用預設字符集 <constant name="struts.i18n.encoding" value="gbk" /> 此配置相當於: request.setCharacterEncoding(“gbk”); r
三大框架(ssh)學習——配置檔案詳解(二)
多配置檔案實現 專案經常需要多人協作開發,但是如果大家都是用同一個struts.xml檔案,會互相影響不利於開發的正常開展。這樣,我們可以通過<include>元素指定多個配置檔案。 可以在src下面建立多個struts配置檔案。然後再struts.xml中分別引入: str
整合ssm框架之配置檔案
ssm整合 一.applicationContext.xml 1.配置資料來源 <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSou
Hibernate hbm 外來鍵關聯——SSH (Spring+Struts+Hibernate)框架搭建之配置檔案序列六
hibernate管理資料庫後,bbm.xml的關聯配置很重要,<many-to-one> 與<one-to-many>一定要配置正確 繼
SSH三大框架的整合
ide exceptio 什麽 知識點 iso 明顯 api 解壓 open SSH三個框架的知識點(http://www.cnblogs.com/tuhooo/p/6491906.html) 一、Hibernate框架 1. Hibernate的核心配置文件 1.
07-spring之三大框架的整合
support 以及 RR 事務管理器 ati body png 方法 nat 1 三大框架整合理論 2 導包(42個) 1 hibernate 1 hibernate/lib/required 2 hibernate/lib/jpa | java pers
SSH三大框架的整合(例項)
搭建專案: 搭建一個實際的專案,為了避免影響到你之前已經搭建過的專案,可以先新建一個工作空間,指定一個新的空間來做這一次的專案,不會和其他的專案衝突,尤其是在編碼這一部分。 指定新工作空間的目錄: 一個新的空間: 新建一個專案: 點選next: 點選next:
初學ssm框架整合的配置檔案
天才第一步,引入依賴庫。 首先想到web.xml的配置不能少 <!-- 上下文的位置 --> <context-param> <param-name>contextConfigLocation</param-name>
SSH三大框架搭建整合struts2+spring+hibernate
SSH框架整合理論: 在SSH框架的JAVAweb專案的開發過程中,WEB層通常使用的是Struts2+jsp,service層使用的是javaBean,DAO層使用的是hibernate,而spring的使用覆蓋三層。 使用了spring框架之後,我們可以把物件交給spring
使用ssh三大框架和整合出現的異常
1. org.hibernate.PropertyNotFoundException: Could not locate getter method for property [cn.itcast.domain.Customer#custId] (adsbygoogle = win
SSH三大框架的整合的個人理解
SSH框架在我的眼裡就是一種對MVC模式的一種直觀的體現模式先說說我個人對SSH框架的各個看法與見解1,Struts2框架(view層)這個框架包含了三個要注意的點(除了導包要匯入的準確,刪掉與Hibernate中重複的包以外),下面三個地方的配置,非常關鍵,第一個是在web
擴充套件:SpringBoot+MyBatis框架+mysql資料庫的整合(配置檔案版)
開發環境:開發工具:Intellij IDEA 2017.2.3JDK : 1.8.0_144spring boot 版本 : 1.5.10.RELEASEmaven : 3.2.3SpringBoot整合MyBatis加入基礎依賴:mybatis:<dependenc
SSH三大框架的整合+利用Ajax實現無重新整理分頁
以下是我利用Struts2.3.24、Spring4.0、Hibernate4.2 結合Mysql資料庫進行的ssh整合,實現分頁需要json.js 首先ssh的整合需要匯入所有的jar包 在web.xml <?xml version="1.0" e
Nginx入門筆記之————配置檔案結構
Nginx入門筆記之————配置檔案結構 ... #全域性塊 events { #events塊 ... } http #http塊 { ... #http全域性塊 server #
Struts2的入門之配置檔案和傳值問題
struts-base.xml檔案詳解這是struts2的基礎配置檔案必須的 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD