XML configuration for Spring jsf hibernate

阅读更多
faces-comfig.xml



xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">


org.springframework.web.jsf.DelegatingVariableResolver


com.iflytek.demo.messages
msgs


en
zn



userBean

com.iflytek.business.UserBean

session

userManager
#{userManager}



/login.jsp

success
/welcome.jsp


failure
/login.jsp




persistence.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">


org.hibernate.ejb.HibernatePersistence

value="com.mysql.jdbc.Driver" />
value="jdbc:mysql://localhost:3306/userservice" />





value="net.sf.ehcache.hibernate.EhCacheProvider" />
value="true" />
value="org.hibernate.dialect.MySQLInnoDBDialect" />






applicationContext.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
xmlns:tx="http://www.springframework.org/schema/tx" default-autowire="byName" default-lazy-init="true">


class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">


class="org.springframework.orm.jpa.JpaTransactionManager">
ref="entityManagerFactory" />




ref="entityManagerFactory" />






web.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

javax.faces.CONFIG_FILES
/WEB-INF/faces-config.xml


contextConfigLocation

/WEB-INF/classes/applicationContext.xml




Faces Servlet
javax.faces.webapp.FacesServlet
0


Faces Servlet
*.faces



org.springframework.web.context.ContextLoaderListener



index.jsp

你可能感兴趣的:(XML,JSF,Hibernate,Spring,JSP)