Commit 7f389121 by HanDongdong

add ojdbc connection by druid. And add jquery-3.2.1 library.

parent 1089fdc1
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
* `src/main/java` JavaBean * `src/main/java` JavaBean
* `src/main/webapp/assets` WEB工程用到的所有资源文件(JS, CSS, 图片) * `src/main/webapp/assets` WEB工程用到的所有资源文件(JS, CSS, 图片)
> 因为中科软平台所使用的一些jar无法添加到maven中央/私有库中,所以只能在/webapp/WEB-INF/lib中添加jar文件 > 因为中科软平台所使用的一些jar无法添加到maven中央/私有库中,所以可能会在/webapp/WEB-INF/lib中添加和平台相关的jar文件。
> ojdbc手动放到了/webapp/WEB-INF/lib目上录中。
## CODING ## CODING
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
<jstl.version>1.2</jstl.version> <jstl.version>1.2</jstl.version>
<servlet.version>3.0-alpha-1</servlet.version> <servlet.version>3.0-alpha-1</servlet.version>
<jsp.api.version>2.1</jsp.api.version> <jsp.api.version>2.1</jsp.api.version>
<mybatis.version>3.2.6</mybatis.version>
<druid.version>1.0.22</druid.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -47,6 +49,31 @@ ...@@ -47,6 +49,31 @@
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId> <artifactId>jstl</artifactId>
<version>${jstl.version}</version> <version>${jstl.version}</version>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<import resource="spring-mvc.xml"/> <import resource="spring-mvc.xml"/>
<import resource="spring-aop.xml"/> <import resource="spring-aop.xml"/>
<import resource="spring-database.xml"/>
<bean id="log4jInitialization" <bean id="log4jInitialization"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
......
<?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:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
">
<!-- 数据源 -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password -->
<property name="url" value="jdbc:oracle:thin:@10.0.191.222:1521:sinoepuias" />
<property name="username" value="epcloud" />
<property name="password" value="epcloud" />
<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="20" />
<!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="300000" />
<property name="validationQuery" value="SELECT 'x' FROM DUAL" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property name="poolPreparedStatements" value="false" />
<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
<!-- 配置监控统计拦截的filters -->
<property name="filters" value="stat" />
</bean>
<!-- 配置druid监控spring jdbc -->
<bean id="druid-stat-interceptor"
class="com.alibaba.druid.support.spring.stat.DruidStatInterceptor">
</bean>
<bean id="druid-stat-pointcut" class="org.springframework.aop.support.JdkRegexpMethodPointcut" scope="prototype">
<property name="patterns">
<list>
<value>com.hi.test.service.*</value>
</list>
</property>
</bean>
<aop:config>
<aop:advisor advice-ref="druid-stat-interceptor"
pointcut-ref="druid-stat-pointcut" />
</aop:config>
<!-- 声明事务 -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" />
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mapperLocations">
<list>
<value>classpath*:com/sinosoft/*/mapper/*Mapper.xml</value>
</list>
</property>
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="annotationClass" value="org.springframework.stereotype.Repository" />
<property name="basePackage" value="com.sinosoft.cbic.*.mapper" />
<property name="sqlSessionFactory" ref="sqlSessionFactory" />
</bean>
</beans>
This diff could not be displayed because it is too large.
<!doctype HTML> <!doctype HTML>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>This is a DEMO for flow chart show by canvas</title> <title>This is a DEMO for flow chart show by canvas</title>
<style type="text/css">
body { text-align: center; }
.flowCanvas {
width: 70rem;
height: 40rem;
border: 1px solid red;
}
</style>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/jquery/jquery-3.2.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var c = document.getElementById('flowCanvas');
var ctx = c.getContext('2d');
ctx.fillStyle = '#ff0000';
ctx.fillRect(0,0,150,75);
});
</script>
</head> </head>
<body> <body>
<p>hello world</p> <canvas id="flowCanvas" class="flowCanvas"></canvas>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment