麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 編程設計 > 正文

使用netbeans搭建jsf+spring框架的方法

2020-07-14 13:26:40
字體:
來源:轉載
供稿:網友

使用netbeans 搭建 JSF+SPRING 框架

spring版本使用4,jsf版本2.2

jsf的配置文件faces-config.xml


復制代碼
代碼如下:

<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.0"
xmlns="<a
xmlns:xsi="<a
xsi:schemaLocation="<a >http://java.sun.com/xml/ns/javaee</a> <a >
<application>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
</application>
</faces-config>

spring配置文件spring-config.xml


復制代碼
代碼如下:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="<a
xmlns:xsi="<a
xmlns:aop="<a
xmlns:c="<a
xmlns:context="<a
xmlns:flow="<a
xmlns:jee="<a
xmlns:jms="<a
xmlns:lang="<a
xmlns:osgi="<a
xmlns:p="<a
xmlns:tx="<a
xmlns:util="<a
xmlns:jpa="<a

xsi:schemaLocation="<a >http://www.springframework.org/schema/beans</a> <a >http://www.springframework.org/schema/beans/spring-beans-4.0.xsd</a>
<a >http://www.springframework.org/schema/aop</a> <a >http://www.springframework.org/schema/aop/spring-aop-4.0.xsd</a>
<a >http://www.springframework.org/schema/context</a> <a >http://www.springframework.org/schema/context/spring-context-4.0.xsd</a>
<a >http://www.springframework.org/schema/webflow-config</a> <a >http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd</a>
<a >http://www.springframework.org/schema/jee</a> <a >http://www.springframework.org/schema/jee/spring-jee-4.0.xsd</a>
<a >http://www.springframework.org/schema/jms</a> <a >http://www.springframework.org/schema/jms/spring-jms-4.0.xsd</a>
<a >http://www.springframework.org/schema/lang</a> <a >http://www.springframework.org/schema/lang/spring-lang-4.0.xsd</a>
<a >http://www.springframework.org/schema/osgi</a> <a >http://www.springframework.org/schema/osgi/spring-osgi-1.2.xsd</a>
<a >http://www.springframework.org/schema/tx</a> <a >http://www.springframework.org/schema/tx/spring-tx-4.0.xsd</a>
<a >http://www.springframework.org/schema/util</a> <a >http://www.springframework.org/schema/util/spring-util-4.0.xsd</a>
<a >http://www.springframework.org/schema/data/jpa</a> <a >http://www.springframework.org/schema/data/jpa/spring-jpa.xsd</a>
">
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
lazy-init="false">
<property name="locations">
<list>
<value>classpath*:jdbc.properties</value>
</list>
</property>
</bean>
<context:annotation-config/>
<context:component-scan base-package="cn.catr.lm.idc" />


<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<!--不使用persistence.xml 做如下配置-->
<property name="packagesToScan" value="cn.catr.lm.idc.po"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"/>
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.connection.driver_class">${jdbc.driverClassName}</prop>
<prop key="hibernate.connection.url">${jdbc.url}</prop>
<prop key="hibernate.connection.username">${jdbc.username}</prop>
<prop key="hibernate.connection.password">${jdbc.password}</prop>
<prop key="hibernate.c3p0.min_size">10</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
</props>
</property>
</bean>

<!-- 配置事務管理器 -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>

<!-- 啟用 annotation事務-->
<tx:annotation-driven transaction-manager="transactionManager"/>

</beans>

jdbc.properties文件


復制代碼
代碼如下:

jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/idc
jdbc.username=root
jdbc.password=111111

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 欧美视频一二三区 | 国产成人羞羞视频在线 | 狠狠干五月| 4399一级成人毛片 | 欧美自拍三区 | 欧美激情区 | 黄色大片网 | 欧美日韩专区国产精品 | 日韩黄色成人 | 二区三区四区 | 久久精品久久精品国产大片 | 色吧久久 | 成人午夜免费国产 | 国产人成免费爽爽爽视频 | 凹凸成人精品亚洲精品密奴 | 末成年女av片一区二区 | 久草成人在线 | 成人男男视频拍拍拍在线观看 | 91色一区二区三区 | 网站激情 | 欧美14一15sex性hd | 日韩深夜视频 | 麻豆视频国产在线观看 | 手机国产乱子伦精品视频 | 午夜爽爽爽男女免费观看hd | 九九热视频在线免费观看 | 久久精品超碰 | 亚洲性爰 | 免费看性xxx高清视频自由 | 国产一区二区在线观看视频 | 国产乱淫a∨片免费观看 | 国产免费激情视频 | 久久国产精品电影 | 最新中文字幕第一页视频 | 欧美性生活区 | 国产精品视频2021 | 国产亚洲精品综合一区 | 日韩精品| 欧美成年人视频在线观看 | 少妇的肉体2无删减版 | 91情侣偷在线精品国产 |