Skip to content

Commit 121be09

Browse files
committed
这里注释出现了中文乱码
明天修改
1 parent ef5fe07 commit 121be09

File tree

287 files changed

+18581
-2492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+18581
-2492
lines changed

.metadata/.log

Lines changed: 1295 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package DAOImpl;
2+
3+
import org.springframework.jdbc.core.support.JdbcDaoSupport;//����
4+
5+
import com.lin.spring.DAO.AccountDAO;
6+
7+
public class AccountDAOImpl extends JdbcDaoSupport implements AccountDAO {
8+
9+
/**
10+
*
11+
* @param out :ת���˻�
12+
* @param account : ת����Ǯ��
13+
*/
14+
public void outMoney(String out,Double account){
15+
StringBuffer sql = new StringBuffer();
16+
sql.append("update account set money = ? where id=?" );
17+
this.getJdbcTemplate().update(sql, account, id)
18+
19+
}
20+
/**
21+
*
22+
* @param in :ת����˺�
23+
* @param account:ת���Ǯ��
24+
*/
25+
26+
public void inMoney(String in,Double account){
27+
28+
}
29+
30+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- 引入约束 -->
3+
<beans xmlns="http://www.springframework.org/schema/beans"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xmlns:aop="http://www.springframework.org/schema/aop"
7+
xmlns:util="http://www.springframework.org/schema/util"
8+
xmlns:tx="http://www.springframework.org/schema/tx"
9+
xmlns:task="http://www.springframework.org/schema/task"
10+
xsi:schemaLocation="http://www.springframework.org/schema/beans
11+
http://www.springframework.org/schema/beans/spring-beans.xsd
12+
http://www.springframework.org/schema/aop
13+
http://www.springframework.org/schema/aop/spring-aop.xsd
14+
http://www.springframework.org/schema/tx
15+
http://www.springframework.org/schema/tx/spring.xsd
16+
http://www.springframework.org/schema/context
17+
http://www.springframework.org/schema/context/spring-context-3.0.xsd
18+
http://www.springframework.org/schema/task
19+
http://www.springframework.org/schema/task/spring-task-3.0.xsd
20+
http://www.springframework.org/schema/util
21+
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
22+
<!-- 引入外部文件 -->
23+
<context:pr
24+
25+
<!-- 配置C3P0连接池 -->
26+
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSoure">
27+
<property name="driverClass" value="${jdbc.driverClass}"></property>
28+
<property name="url" value="${jdbc.url}"></property>
29+
<property name="username" value="${jdbc.username}"></property>
30+
<property name="password" value="${jdbc.password}"></property>
31+
</bean>
32+
<!-- 配置jdbcTemplate -->
33+
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
34+
<constructor-arg ref="dataSource" />
35+
</bean>
36+
<!-- 配置业务层类
37+
<bean id="accountService" class="com.lin.spring.Service">
38+
<property name="accountDao" ref="accountDao"></property>
39+
</bean> -->
40+
<!-- 配置DAO类 -->
41+
<bean id="accountDao" class="com.lin.spring.DAO">
42+
<property name="dataSource" ref="dataSource"></property>
43+
</bean>
44+
</beans>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package test;
2+
3+
import org.junit.runner.RunWith;
4+
import org.springframework.test.context.ContextConfiguration;
5+
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
6+
7+
import com.lin.spring.DAO.AccountDAO;
8+
9+
/**
10+
* ת�˲�����
11+
* @author HSAEE
12+
*
13+
*/
14+
@RunWith(SpringJUnit4ClassRunner.class)
15+
@ContextConfiguration("classpath:SpringApplicationContext.xml")
16+
public class Test {
17+
//����ҵ����
18+
//@Resource(name="accountService")
19+
//private AccountService accountService;
20+
//@Resource(name="accountService")
21+
private AccountDAO accountDao;
22+
@org.junit.Test
23+
public void test() {
24+
System.out.println("123");
25+
accountService.transfer("aaa", "bbb", 200d);
26+
}
27+
28+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
jdbc.driverClass=com.mysql.jdbc.Driver
2+
jdbc.url=jdbc:mysql://localhost:3306/spring_transaction?useUnicode=true&characterEncoding=UTF-8
3+
jdbc.username=root
4+
jdbc.password=root
5+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- 引入约束 -->
3+
<beans xmlns="http://www.springframework.org/schema/beans"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xmlns:aop="http://www.springframework.org/schema/aop"
7+
xmlns:util="http://www.springframework.org/schema/util"
8+
xmlns:tx="http://www.springframework.org/schema/tx"
9+
xmlns:task="http://www.springframework.org/schema/task"
10+
xsi:schemaLocation="http://www.springframework.org/schema/beans
11+
http://www.springframework.org/schema/beans/spring-beans.xsd
12+
http://www.springframework.org/schema/aop
13+
http://www.springframework.org/schema/aop/spring-aop.xsd
14+
http://www.springframework.org/schema/tx
15+
http://www.springframework.org/schema/tx/spring.xsd
16+
http://www.springframework.org/schema/context
17+
http://www.springframework.org/schema/context/spring-context-3.0.xsd
18+
http://www.springframework.org/schema/task
19+
http://www.springframework.org/schema/task/spring-task-3.0.xsd
20+
http://www.springframework.org/schema/util
21+
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
22+
<!-- 引入外部文件 -->
23+
<context:property-placeholder location="classpath:jdbc.properties"/>
24+
25+
<!-- 配置C3P0连接池 -->
26+
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSoure">
27+
<property name="driverClass" value="${jdbc.driverClass}"></property>
28+
<property name="url" value="${jdbc.url}"></property>
29+
<property name="username" value="${jdbc.username}"></property>
30+
<property name="password" value="${jdbc.password}"></property>
31+
</bean>
32+
<!-- 配置jdbcTemplate -->
33+
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
34+
<constructor-arg ref="dataSource" />
35+
</bean>
36+
<!-- 配置业务层类
37+
<bean id="accountService" class="com.lin.spring.Service">
38+
<property name="accountDao" ref="accountDao"></property>
39+
</bean> -->
40+
<!-- 配置DAO类
41+
<bean id="accountDao" class="com.lin.spring.DAO">
42+
<property name="dataSource" ref="dataSource"></property>-->
43+
</bean>
44+
</beans>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
jdbc.driverClass=com.mysql.jdbc.Driver
2+
jdbc.url=localhost:3306/spring_transaction?useUnicode=true&characterEncoding=UTF-8
3+
jdbc.username=root
4+
jdbc.password=root
5+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- 引入约束 -->
3+
<beans xmlns="http://www.springframework.org/schema/beans"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xmlns:aop="http://www.springframework.org/schema/aop"
7+
xmlns:util="http://www.springframework.org/schema/util"
8+
xmlns:tx="http://www.springframework.org/schema/tx"
9+
xmlns:task="http://www.springframework.org/schema/task"
10+
xsi:schemaLocation="http://www.springframework.org/schema/beans
11+
http://www.springframework.org/schema/beans/spring-beans.xsd
12+
http://www.springframework.org/schema/aop
13+
http://www.springframework.org/schema/aop/spring-aop.xsd
14+
http://www.springframework.org/schema/tx
15+
http://www.springframework.org/schema/tx/spring.xsd
16+
http://www.springframework.org/schema/context
17+
http://www.springframework.org/schema/context/spring-context-3.0.xsd
18+
http://www.springframework.org/schema/task
19+
http://www.springframework.org/schema/task/spring-task-3.0.xsd
20+
http://www.springframework.org/schema/util
21+
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
22+
<!-- 引入外部文件 -->
23+
<context:property-placeholder location="classpath:jdbc.properties"/>
24+
25+
<!-- 配置C3P0连接池 -->
26+
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
27+
<!-- <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSoure">-->
28+
<property name="driverClass" value="${jdbc.driverClass}"></property>
29+
<property name="url" value="${jdbc.url}"></property>
30+
<property name="username" value="${jdbc.username}"></property>
31+
<property name="password" value="${jdbc.password}"></property>
32+
</bean>
33+
<!-- 配置jdbcTemplate -->
34+
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
35+
<constructor-arg ref="dataSource" />
36+
</bean>
37+
<!-- 配置业务层类-->
38+
<bean id="accountService" class="com.lin.springServiceImpl">
39+
<property name="accountDao" ref="accountDao"></property>
40+
</bean>
41+
<!-- 配置DAO类 -->
42+
<bean id="accountDao" class="DAOImpl">
43+
<property name="dataSource" ref="dataSource"></property>
44+
</bean>
45+
</beans>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package test;
2+
3+
import org.junit.runner.RunWith;
4+
import org.springframework.test.context.ContextConfiguration;
5+
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
6+
7+
import com.lin.spring.DAO.AccountDAO;
8+
9+
/**
10+
* ת�˲�����
11+
* @author HSAEE
12+
*
13+
*/
14+
@RunWith(SpringJUnit4ClassRunner.class)
15+
@ContextConfiguration("classpath:SpringApplicationContext.xml")
16+
public class Test {
17+
//����ҵ����
18+
//@Resource(name="accountService")
19+
//private AccountService accountService;
20+
@Resource(name="accountService")
21+
private AccountDAO accountDao;
22+
@org.junit.Test
23+
public void test() {
24+
System.out.println("123");
25+
accountService.transfer("aaa", "bbb", 200d);
26+
}
27+
28+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- 引入约束 -->
3+
<beans xmlns="http://www.springframework.org/schema/beans"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xmlns:aop="http://www.springframework.org/schema/aop"
7+
xmlns:util="http://www.springframework.org/schema/util"
8+
xmlns:tx="http://www.springframework.org/schema/tx"
9+
xmlns:task="http://www.springframework.org/schema/task"
10+
xsi:schemaLocation="http://www.springframework.org/schema/beans
11+
http://www.springframework.org/schema/beans/spring-beans.xsd
12+
http://www.springframework.org/schema/aop
13+
http://www.springframework.org/schema/aop/spring-aop.xsd
14+
http://www.springframework.org/schema/tx
15+
http://www.springframework.org/schema/tx/spring.xsd
16+
http://www.springframework.org/schema/context
17+
http://www.springframework.org/schema/context/spring-context-3.0.xsd
18+
http://www.springframework.org/schema/task
19+
http://www.springframework.org/schema/task/spring-task-3.0.xsd
20+
http://www.springframework.org/schema/util
21+
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
22+
<!-- 引入外部文件 -->
23+
<context:property-placeholder location="classpath:jdbc.properties"/>
24+
25+
<!-- 配置C3P0连接池 -->
26+
<!-- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
27+
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
28+
<property name="url" value="jdbc:mysql://localhost:3306/spring-transaction?useUnicode=true&amp;characterEncoding=utf-8"></property>
29+
<property name="username" value="root"/>
30+
<property name="password" value="root" /> -->
31+
32+
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
33+
<!-- <property name="driverClass" value="${jdbc.driverClass}"></property>
34+
<property name="url" value="${jdbc.url}"></property>
35+
<property name="username" value="${jdbc.username}"></property>
36+
<property name="password" value="${jdbc.password}"></property>-->
37+
<property name="driverClass">
38+
<value>com.mysql.jdbc.Driver</value>
39+
</property>
40+
<property name="jdbcUrl">
41+
<value>jdbc:mysql://192.168.1.101:3306/s?useUnicode=true&characterEncoding=UTF-8</value>
42+
</property>
43+
<property name="user">
44+
<value>root</value>
45+
</property>
46+
<property name="password">
47+
<value>root</value>
48+
</property>
49+
</bean>
50+
<!-- 配置jdbcTemplate
51+
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
52+
<constructor-arg ref="dataSource" />
53+
</bean>-->
54+
<!-- 配置业务层类
55+
<bean id="accountService" class="com.lin.springServiceImpl">
56+
<property name="accountDao" ref="accountDao"></property>
57+
</bean> -->
58+
<!-- 配置DAO类
59+
<bean id="accountDao" class="DAOImpl">
60+
<property name="dataSource" ref="dataSource"></property>
61+
</bean> -->
62+
</beans>

.metadata/.plugins/org.eclipse.core.resources/.history/81/20926a787e0d00171d33975734f71029 renamed to .metadata/.plugins/org.eclipse.core.resources/.history/1d/3030b278830d00171d33975734f71029

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,21 @@
88
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
99
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
1010
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
11-
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"
12-
default-autowire="byName" default-lazy-init="false">
13-
14-
<!-- MiniDao动态代理类 -->
15-
<bean id="miniDaoHandler" class="org.jeecgframework.minidao.factory.MiniDaoBeanScannerConfigurer">
16-
<!-- 是使用什么字母做关键字Map的关键字 默认值origin 即和sql保持一致,lower小写(推荐),upper 大写 -->
17-
<property name="keyType" value="lower"></property>
18-
<!-- 格式化sql -->
19-
<property name="formatSql" value="false"></property>
20-
<!-- 输出sql -->
21-
<property name="showSql" value="false"></property>
22-
<!-- 数据库类型 -->
23-
<property name="dbType" value="sqlserver"></property>
24-
<!-- dao地址,配置符合spring方式 -->
25-
<property name="basePackage" value="org.jeecgframework.web,com.mss.shtoone.bim.*"></property>
26-
<!-- 使用的注解,默认是Minidao,推荐 Repository-->
27-
<property name="annotation" value="org.springframework.stereotype.Repository"></property>
11+
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
12+
<!-- 引入外部文件 -->
13+
<context:property-placeholder location="classpath:jdbc.properties"/>
14+
<!-- 配置C3P0连接池 -->
15+
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSoure">
16+
<property name="driverClass" value="${jdbc.driverClass}"></property>
17+
<property name="url" value="${jdbc.url}"></property>
18+
<property name="username" value="${jdbc.username}"></property>
19+
<property name="password" value="${jdbc.password}"></property>
20+
</bean>
21+
<!-- 配置业务层类 -->
22+
<bean id="accountService" class="com.lin.spring.Service">
23+
</bean>
24+
<!-- 配置DAO类 -->
25+
<bean id="accountDao" class="com.lin.spring.DAO">
26+
<property name="dataSource" value="datasource"></property>
2827
</bean>
2928
</beans>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- 引入约束 -->
3+
<beans xmlns="http://www.springframework.org/schema/beans"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xmlns:aop="http://www.springframework.org/schema/aop"
7+
xmlns:util="http://www.springframework.org/schema/util"
8+
xmlns:tx="http://www.springframework.org/schema/tx"
9+
xmlns:task="http://www.springframework.org/schema/task"
10+
xsi:schemaLocation="http://www.springframework.org/schema/beans
11+
http://www.springframework.org/schema/beans/spring-beans.xsd
12+
http://www.springframework.org/schema/aop
13+
http://www.springframework.org/schema/aop/spring-aop.xsd
14+
http://www.springframework.org/schema/tx
15+
http://www.springframework.org/schema/tx/spring.xsd
16+
http://www.springframework.org/schema/context
17+
http://www.springframework.org/schema/context/spring-context-3.0.xsd
18+
http://www.springframework.org/schema/task
19+
http://www.springframework.org/schema/task/spring-task-3.0.xsd
20+
http://www.springframework.org/schema/util
21+
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
22+
<!-- 引入外部文件 -->
23+
<context:property-placeholder location="classpath:jdbc.properties"/>
24+
25+
<!-- 配置C3P0连接池 -->
26+
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSoure">
27+
<property name="driverClass" value="${jdbc.driverClass}"></property>
28+
<property name="url" value="${jdbc.url}"></property>
29+
<property name="username" value="${jdbc.username}"></property>
30+
<property name="password" value="${jdbc.password}"></property>
31+
</bean>
32+
<!-- 配置jdbcTemplate -->
33+
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
34+
<constructor-arg ref="dataSource" />
35+
</bean>
36+
<!-- 配置业务层类
37+
<bean id="accountService" class="com.lin.spring.Service">
38+
<property name="accountDao" ref="accountDao"></property>
39+
</bean> -->
40+
<!-- 配置DAO类 -->
41+
<bean id="accountDao" class="com.lin.spring.DAO">
42+
<property name="dataSource" ref="dataSource"></property>
43+
</bean>
44+
</beans>

0 commit comments

Comments
 (0)