-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from uavorg/master
merge from uavstack
- Loading branch information
Showing
11 changed files
with
195 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
...torframework.buildFat/src/main/java/com/creditease/monitorframework/fat/mybatis/User.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/*- | ||
* << | ||
* UAVStack | ||
* == | ||
* Copyright (C) 2016 - 2017 UAVStack | ||
* == | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* >> | ||
*/ | ||
|
||
package com.creditease.monitorframework.fat.mybatis; | ||
|
||
|
||
/** | ||
* User description: ??? | ||
* | ||
*/ | ||
public class User { | ||
|
||
private int id; | ||
private String name; | ||
private int age; | ||
|
||
/** | ||
* @return the id | ||
*/ | ||
public int getId() { | ||
|
||
return id; | ||
} | ||
|
||
/** | ||
* @param id the id to set | ||
*/ | ||
public void setId(int id) { | ||
|
||
this.id = id; | ||
} | ||
|
||
/** | ||
* @return the name | ||
*/ | ||
public String getName() { | ||
|
||
return name; | ||
} | ||
|
||
/** | ||
* @param name the name to set | ||
*/ | ||
public void setName(String name) { | ||
|
||
this.name = name; | ||
} | ||
|
||
/** | ||
* @return the age | ||
*/ | ||
public int getAge() { | ||
|
||
return age; | ||
} | ||
|
||
/** | ||
* @param age the age to set | ||
*/ | ||
public void setAge(int age) { | ||
|
||
this.age = age; | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...amework.buildFat/src/main/java/com/creditease/monitorframework/fat/mybatis/UserMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="com.creditease.monitorframework.fat.mybatis.UserMapper"> | ||
<select id="selectUser" resultType="com.creditease.monitorframework.fat.mybatis.User"> | ||
select * from mytest where id = #{id} | ||
</select> | ||
<select id="insertUser" parameterType="com.creditease.monitorframework.fat.mybatis.User"> | ||
insert into mytest(id,name, age) values(#{id},#{name}, #{age}) | ||
</select> | ||
<select id="deleteUser"> | ||
delete from mytest where id = #{id} | ||
</select> | ||
</mapper> |
20 changes: 20 additions & 0 deletions
20
...ork.buildFat/src/main/java/com/creditease/monitorframework/fat/mybatis/mybatis-config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE configuration | ||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-config.dtd"> | ||
<configuration> | ||
<environments default="development"> | ||
<environment id="development"> | ||
<transactionManager type="JDBC" /> | ||
<dataSource type="POOLED"> | ||
<property name="driver" value="com.mysql.jdbc.Driver" /> | ||
<property name="url" value="jdbc:mysql://127.0.0.1:3306/testdb" /> | ||
<property name="username" value="root" /> | ||
<property name="password" value="root" /> | ||
</dataSource> | ||
</environment> | ||
</environments> | ||
<mappers> | ||
<mapper resource="com/creditease/monitorframework/fat/mybatis/UserMapper.xml" /> | ||
</mappers> | ||
</configuration> |