设为首页 加入收藏

TOP

简单Spring+Struts2+Hibernate框架搭建(二)
2017-10-12 18:17:19 】 浏览:9846
Tags:简单 Spring Struts2 Hibernate 框架 搭建
roupId> <artifactId>spring-aop</artifactId> <version>3.2.10.RELEASE</version> </dependency> <!-- https://mvnrepository.com/artifact/org.springframework/spring-core --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> <version>3.2.10.RELEASE</version> </dependency> <!-- https://mvnrepository.com/artifact/org.springframework/spring-core --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>3.2.10.RELEASE</version> </dependency> <!-- https://mvnrepository.com/artifact/proxool/proxool --> <dependency> <groupId>proxool</groupId> <artifactId>proxool</artifactId> <version>0.9.1</version> </dependency> <!-- https://mvnrepository.com/artifact/com.cloudhopper.proxool/proxool-cglib --> <dependency> <groupId>com.cloudhopper.proxool</groupId> <artifactId>proxool-cglib</artifactId> <version>0.9.1</version> </dependency> </dependencies> </project> 
  • jdbc.properties
    proxool.maxConnCount=10
    proxool.minConnCount=5
    proxool.statistics=1m,15m,1h,1d
    proxool.simultaneousBuildThrottle=30
    proxool.trace=false
    
    jdbc.driverClassName=com.mysql.jdbc.Driver
    jdbc.url=jdbc:mysql://localhost:3306/test
    jdbc.username=root
    jdbc.password=123456
  • applicationContext
    <?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:context="http://www.springframework.org/schema/context"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans  
                               http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
                               http://www.springframework.org/schema/tx  
                               http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
                               http://www.springframework.org/schema/aop  
                               http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                               http://www.springframework.org/schema/context
                               http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    
    
    	<!-- 引入外部属性文件 -->
    	<context:property-placeholder location="classpath:jdbc.properties" />
    
    	<context:annotation-config />
    	<!-- 配置扫描包 -->
    	<context:component-scan base-package="com.ssh.*" />
    
    	<!-- 配置数据源 -->
    	<bean id="dataSource"
    		class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
    		<property name="targetDataSource">
    			<bean class="org.logicalcobwebs.proxool.ProxoolDataSource">
    				<property name="driver" value="${jdbc.driverClassName}" /&
  • 首页 上一页 1 2 3 4 5 6 7 下一页 尾页 2/7/7
    】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
    上一篇JAVA垃圾回收机制概要 下一篇关于Springmvc中include与Sitemes..

    最新文章

    热门文章

    Hot 文章

    Python

    C 语言

    C++基础

    大数据基础

    linux编程基础

    C/C++面试题目