• R/O
  • SSH
  • HTTPS

dbdiffreport: Commit


Commit MetaInfo

Revision358 (tree)
Zeit2022-04-23 18:35:58
Autort0145jp

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/xxxMyBatis/src/mybatis-config_oracle.xml (revision 357)
+++ trunk/xxxMyBatis/src/mybatis-config_oracle.xml (revision 358)
@@ -8,7 +8,7 @@
88 <transactionManager type="JDBC"/>
99 <dataSource type="POOLED">
1010 <property name="driver" value="oracle.jdbc.OracleDriver"/>
11- <property name="url" value="jdbc:oracle:thin:@localhost:1521:xe"/>
11+ <property name="url" value="jdbc:oracle:thin:@localhost:1521/xepdb1"/>
1212 <property name="username" value="HR"/>
1313 <property name="password" value="HR"/>
1414 </dataSource>
--- trunk/xxxMyBatis/src/sample/logiic/DB.java (revision 357)
+++ trunk/xxxMyBatis/src/sample/logiic/DB.java (revision 358)
@@ -13,7 +13,7 @@
1313 private static SqlSessionFactory sqlSessionFactory;
1414 static {
1515 try {
16- InputStream inputStream = Resources.getResourceAsStream("mybatis-config.xml");
16+ InputStream inputStream = Resources.getResourceAsStream("mybatis-config_oracle.xml");
1717 sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
1818 } catch (Exception e) {
1919 e.printStackTrace();
--- trunk/xxxMyBatis/src/sample/logiic/SampleLogic.java (revision 357)
+++ trunk/xxxMyBatis/src/sample/logiic/SampleLogic.java (revision 358)
@@ -3,9 +3,9 @@
33
44 import org.apache.ibatis.session.RowBounds;
55
6-import test.mybatis.entity.CountriesEntity;
7-import test.mybatis.entity.CountriesExample;
8-import test.mybatis.mapper.CountriesMapper;
6+import test.oracle.CountriesEntity;
7+import test.oracle.CountriesExample;
8+import test.oracle.CountriesMapper;
99
1010 public class SampleLogic extends AbstractLogic {
1111
--- trunk/xxxMyBatis/src/sample/logiic/SampleMapper.java (revision 357)
+++ trunk/xxxMyBatis/src/sample/logiic/SampleMapper.java (revision 358)
@@ -7,7 +7,7 @@
77 import org.apache.ibatis.annotations.Select;
88 import org.apache.ibatis.session.RowBounds;
99
10-import test.mybatis.entity.CountriesEntity;
10+import test.oracle.CountriesEntity;
1111
1212 public interface SampleMapper {
1313
--- trunk/xxxMyBatis/src/test/TestOracle.java (nonexistent)
+++ trunk/xxxMyBatis/src/test/TestOracle.java (revision 358)
@@ -0,0 +1,31 @@
1+package test;
2+import java.io.InputStream;
3+import java.util.List;
4+
5+import org.apache.ibatis.io.Resources;
6+import org.apache.ibatis.session.SqlSession;
7+import org.apache.ibatis.session.SqlSessionFactory;
8+import org.apache.ibatis.session.SqlSessionFactoryBuilder;
9+
10+import test.oracle.CountriesEntity;
11+import test.oracle.CountriesMapper;
12+
13+public class TestOracle {
14+
15+ public static void main(String[] args) throws Exception {
16+ String resource = "mybatis-config_oracle.xml";
17+ InputStream inputStream = Resources.getResourceAsStream(resource);
18+ SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
19+
20+ SqlSession sqlSession = sqlSessionFactory.openSession();
21+ try {
22+ CountriesMapper mapper = sqlSession.getMapper(CountriesMapper.class);
23+ List<CountriesEntity> list = mapper.selectByExample(null);
24+ for (CountriesEntity dto : list) {
25+ System.out.println(dto);
26+ }
27+ } finally {
28+ sqlSession.close();
29+ }
30+ }
31+}
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Show on old repository browser