diff --git a/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java b/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java index b46136b70a8939a1a015c11ed7c9971a9d0b069c..8d4ca47d5ee5d351a48bcc1554531566116f5a52 100644 --- a/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java +++ b/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java @@ -1,6 +1,7 @@ package com.taosdata.example.jdbcTemplate.dao; import com.taosdata.example.jdbcTemplate.domain.Weather; +import com.taosdata.example.jdbcTemplate.dao.WeatherDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.BatchPreparedStatementSetter; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java b/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java index a1f788fdcff65fd124c98932c5f034f20a57d133..29d0f79fd4982d43078e590b4320c0df457ee44c 100644 --- a/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java +++ b/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java @@ -28,7 +28,6 @@ public class BatcherInsertTest { @Autowired private ExecuteAsStatement executor; - private static final String dbname = "jdbc_template_test"; private static final int numOfRecordsPerTable = 1000; private static long ts = 1496732686000l; private static Random random = new Random(System.currentTimeMillis()); @@ -36,13 +35,13 @@ public class BatcherInsertTest { @Before public void before() { // drop database - executor.doExecute("drop database if exists " + dbname); + executor.doExecute("drop database if exists test"); // create database - executor.doExecute("create database if not exists " + dbname); + executor.doExecute("create database if not exists test"); //use database - executor.doExecute("use " + dbname); + executor.doExecute("use test"); // create table - executor.doExecute("create table if not exists weather (ts timestamp, temperature int, humidity float)"); + executor.doExecute("create table if not exists test.weather (ts timestamp, temperature int, humidity float)"); } @Test