spring hsqldb 测试潜入数据库 配置程序

1、配置xml文件

 id="dataSource">
     location="classpath:schema.sql"/>
     location="classpath:test-data.sql"/>
需要命名空间:

xmlns:jdbc="http://www.springframework.org/schema/jdbc"

http://www.springframework.org/schema/jdbc 

http://www.springframework.org/schema/jdbc/spring-jdbc.xsd


2、配置*.sql文件

CREATE TABLE tax_info(
code varchar(50) NOT NULL,
number varchar(50) NOT NULL,
state varchar(50) NOT NULL,
useDate timestamp NOT NULL,
money decimal(18, 2) NOT NULL,
originalCode varchar(50) NULL,
originalNumber varchar(50) NULL
) ;

INSERT INTO tax_info (code, number, state, useDate, money) values ('212012331221','00000001','NORMAL','2009-12-20 20:01:02',5.0);




你可能感兴趣的:(spring hsqldb 测试潜入数据库 配置程序)