spring+hibernate+mysql mvc 配置

spring+hibernate+mysql mvc 配置xml version=”1.0″ encoding=”UTF-8″?>DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”>beans>      bean id=”viewResolver”        class=”

spring+hibernate+mysql mvc 配置
<?
xml version=”1.0″ encoding=”UTF-8″
?>

spring+hibernate+mysql mvc 配置

<!
DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”
>

spring+hibernate+mysql mvc 配置

<
beans
>

spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”viewResolver”

spring+hibernate+mysql mvc 配置        class

=”org.springframework.web.servlet.view.InternalResourceViewResolver”
>

spring+hibernate+mysql mvc 配置      

<
property 
name
=”viewClass”
>

spring+hibernate+mysql mvc 配置         

<
value
>

spring+hibernate+mysql mvc 配置           org.springframework.web.servlet.view.JstlView
spring+hibernate+mysql mvc 配置         

</
value
>

spring+hibernate+mysql mvc 配置      

</
property
>
  
spring+hibernate+mysql mvc 配置      
spring+hibernate+mysql mvc 配置      

<
property 
name
=”prefix”
>

spring+hibernate+mysql mvc 配置         

<
value
>

spring+hibernate+mysql mvc 配置           /admin/
spring+hibernate+mysql mvc 配置         

</
value
>

spring+hibernate+mysql mvc 配置      

</
property
>

spring+hibernate+mysql mvc 配置      
spring+hibernate+mysql mvc 配置      

<
property 
name
=”suffix”
>

spring+hibernate+mysql mvc 配置         

<
value
>
.jsp
</
value
>

spring+hibernate+mysql mvc 配置      

</
property
>

spring+hibernate+mysql mvc 配置   

</
bean
>

spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”urlMapping”

spring+hibernate+mysql mvc 配置       class

=”org.springframework.web.servlet.handler.SimpleUrlHandlerMapping”
>

spring+hibernate+mysql mvc 配置       

<
property 
name
=”mappings”
>

spring+hibernate+mysql mvc 配置          

<
props
>

spring+hibernate+mysql mvc 配置             

<
prop 
key
=”/admin/login.do”
>
LoginAction
</
prop
>

spring+hibernate+mysql mvc 配置          

</
props
>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置   

</
bean
>
   
spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”exceptionResolver”

spring+hibernate+mysql mvc 配置      class

=”org.springframework.web.servlet.handler.SimpleMappingExceptionResolver”
>
 
spring+hibernate+mysql mvc 配置      

<
property 
name
=”defaultErrorView”
>

spring+hibernate+mysql mvc 配置           

<
value
>
failure
</
value
>

spring+hibernate+mysql mvc 配置      

</
property
>

spring+hibernate+mysql mvc 配置      
spring+hibernate+mysql mvc 配置      

<
property 
name
=”exceptionMappings”
>

spring+hibernate+mysql mvc 配置           

<
props
>

spring+hibernate+mysql mvc 配置              

<
prop 
key
=”java.sql.SQLException”
>
showDBError
</
prop
>

spring+hibernate+mysql mvc 配置              

<
prop 
key
=”java.lang.RuntimeException”
>
showError
</
prop
>

spring+hibernate+mysql mvc 配置           

</
props
>

spring+hibernate+mysql mvc 配置      

</
property
>

spring+hibernate+mysql mvc 配置   

</
bean
>

spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”dataSource”

spring+hibernate+mysql mvc 配置        class

=”org.apache.commons.dbcp.BasicDataSource”

spring+hibernate+mysql mvc 配置        destroy-method

=”close”
>

spring+hibernate+mysql mvc 配置        
spring+hibernate+mysql mvc 配置        

<
property 
name
=”driverClassName”
>

spring+hibernate+mysql mvc 配置           

<
value
>
org.git.mm.mysql.Driver
</
value
>

spring+hibernate+mysql mvc 配置        

</
property
>

spring+hibernate+mysql mvc 配置        
spring+hibernate+mysql mvc 配置        

<
property 
name
=”url”
>

spring+hibernate+mysql mvc 配置            

<
value
>
jdbc:mysql://localhost:3306/babyonline
</
value
>

spring+hibernate+mysql mvc 配置        

</
property
>

spring+hibernate+mysql mvc 配置        
spring+hibernate+mysql mvc 配置        

<
property 
name
=”username”
>

spring+hibernate+mysql mvc 配置            

<
value
>
root
</
value
>

spring+hibernate+mysql mvc 配置        

</
property
>

spring+hibernate+mysql mvc 配置        
spring+hibernate+mysql mvc 配置        

<
property 
name
=”password”
>

spring+hibernate+mysql mvc 配置            

<
value
>
123456
</
value
>

spring+hibernate+mysql mvc 配置        

</
property
>

spring+hibernate+mysql mvc 配置   

</
bean
>

spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”sessionFactory”

spring+hibernate+mysql mvc 配置       class

=”org.springframework.orm.hibernate3.LocalSessionFactoryBean”
>

spring+hibernate+mysql mvc 配置       
spring+hibernate+mysql mvc 配置       

<
property 
name
=”dataSource”
>

spring+hibernate+mysql mvc 配置          

<
ref 
local
=”dataSource”
/>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置       
spring+hibernate+mysql mvc 配置       

<
property 
name
=”mappingResources”
>

spring+hibernate+mysql mvc 配置          

<
list
>

spring+hibernate+mysql mvc 配置             

<
value
></
value
>

spring+hibernate+mysql mvc 配置          

</
list
>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置       
spring+hibernate+mysql mvc 配置       

<
property 
name
=”hibernateProperties”
>

spring+hibernate+mysql mvc 配置           

<
props
>

spring+hibernate+mysql mvc 配置              

<
prop 
key
=”hibernate.dialect”
>

spring+hibernate+mysql mvc 配置                  org.hibernate.dialect.MySQLDialect                 
spring+hibernate+mysql mvc 配置              

</
prop
>

spring+hibernate+mysql mvc 配置              

<
prop 
key
=”hibernate.show_sql”
>

spring+hibernate+mysql mvc 配置                 true
spring+hibernate+mysql mvc 配置              

</
prop
>

spring+hibernate+mysql mvc 配置           

</
props
>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置   

</
bean
>

spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”transactionManager”

spring+hibernate+mysql mvc 配置       class

=”org.springframework.jdbc.datasource.DataSourceTransactionManager”
>

spring+hibernate+mysql mvc 配置       

<
property 
name
=”dataSource”
>

spring+hibernate+mysql mvc 配置          

<
ref 
local
=”dataSource”
/>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置   

</
bean
>

spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”userDAO”
 class
=””
>

spring+hibernate+mysql mvc 配置      

<
property 
name
=”sessionFactory”
>

spring+hibernate+mysql mvc 配置         

<
ref 
local
=”sessionFactory”
/>

spring+hibernate+mysql mvc 配置      

</
property
>

spring+hibernate+mysql mvc 配置   

</
bean
>

spring+hibernate+mysql mvc 配置   
spring+hibernate+mysql mvc 配置   

<
bean 
id
=”userDAOProxy”

spring+hibernate+mysql mvc 配置       class

=”org.springframework.transaction.interceptor.TransactionProxyFactoryBean”
>

spring+hibernate+mysql mvc 配置       

<
property 
name
=”transactionManager”
>

spring+hibernate+mysql mvc 配置          

<
ref 
bean
=”transactionManager”
/>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置       
spring+hibernate+mysql mvc 配置       

<
property 
name
=”target”
>

spring+hibernate+mysql mvc 配置           

<
ref 
local
=”userDAO”
/>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置       
spring+hibernate+mysql mvc 配置       

<
property 
name
=”transactionAttributes”
>

spring+hibernate+mysql mvc 配置          

<
props
>

spring+hibernate+mysql mvc 配置              

<
prop 
key
=”insert*”
>
PROPAGATION_REQUIRED
</
prop
>

spring+hibernate+mysql mvc 配置              

<
prop 
key
=”get*”
>
PROPAGATION_REQUIRED,readonly
</
prop
>

spring+hibernate+mysql mvc 配置          

</
props
>

spring+hibernate+mysql mvc 配置       

</
property
>

spring+hibernate+mysql mvc 配置    

</
bean
>

spring+hibernate+mysql mvc 配置

</
beans
>

 有时间再对以上配置解释.
spring+hibernate+mysql mvc 配置

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/35981.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注