JDBC数据库查询语句
public class BrandText {
/**
* 查询所有
* 1.SQL:select * from tb_brand;
* 参数:不需要
* 结果:List<Brand>
*/
@Test
public void testSelectAll() throws Exception {
//加载配置文件
Properties prop = new Properties();
//路径有时会出错,得加多个头项目名
prop.load(new FileInputStream("D:/node/jdbc/jdbc-demo/src/druid.properties"));
//获取连接池对象
DataSource dataSource = DruidDataSourceFactory.cr