parent
94d1847f9d
commit
90f25fc449
|
@ -1,11 +1,11 @@
|
|||
package com.baeldung.jdbcClient;
|
||||
package com.baeldung.jdbcclient;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@SpringBootApplication
|
||||
@ComponentScan(basePackages = "com.baeldung.jdbcClient")
|
||||
@ComponentScan(basePackages = "jdbcclient")
|
||||
public class JdbcClientDemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
|
@ -1,8 +1,8 @@
|
|||
package com.baeldung.jdbcClient.dao;
|
||||
package com.baeldung.jdbcclient.dao;
|
||||
|
||||
import com.baeldung.jdbcClient.model.Student;
|
||||
import com.baeldung.jdbcClient.model.StudentResultExtractor;
|
||||
import com.baeldung.jdbcClient.model.StudentRowMapper;
|
||||
import com.baeldung.jdbcclient.model.Student;
|
||||
import com.baeldung.jdbcclient.model.StudentResultExtractor;
|
||||
import com.baeldung.jdbcclient.model.StudentRowMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.jdbcClient.model;
|
||||
package com.baeldung.jdbcclient.model;
|
||||
|
||||
public class Student {
|
||||
private Integer studentId;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.jdbcClient.model;
|
||||
package com.baeldung.jdbcclient.model;
|
||||
|
||||
import org.springframework.jdbc.core.ResultSetExtractor;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.jdbcClient.model;
|
||||
package com.baeldung.jdbcclient.model;
|
||||
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.jdbcClient;
|
||||
package com.baeldung.jdbcclient;
|
||||
|
||||
import com.baeldung.jdbcClient.dao.StudentDao;
|
||||
import com.baeldung.jdbcClient.model.Student;
|
||||
import com.baeldung.jdbcclient.dao.StudentDao;
|
||||
import com.baeldung.jdbcclient.model.Student;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -20,10 +20,10 @@ import java.util.Optional;
|
|||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@Sql(value = "/com.baeldung.jdbcClient/student.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
|
||||
@Sql(value = "/com.baeldung.jdbcClient/drop_student.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD)
|
||||
@Sql(value = "/jdbcclient/student.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
|
||||
@Sql(value = "/jdbcclient/drop_student.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD)
|
||||
@SpringBootTest(classes = JdbcClientDemoApplication.class)
|
||||
@TestPropertySource(locations = {"classpath:com.baeldung.jdbcClient/application.properties"})
|
||||
@TestPropertySource(locations = {"classpath:jdbcclient/application.properties"})
|
||||
public class JdbcClientUnitTest {
|
||||
private static final Logger logger = LoggerFactory.getLogger(JdbcClientUnitTest.class);
|
||||
|
Loading…
Reference in New Issue