汇联通执法队后台管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DB2SqlScript.java 778B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Date: 2015年4月22日
  3. * author: Peream (peream@gmail.com)
  4. *
  5. */
  6. package tests;
  7. import java.io.File;
  8. import java.io.FileWriter;
  9. import org.junit.Test;
  10. import cn.com.taiji.common.pub.FileCopyTools;
  11. /**
  12. *
  13. * @author Peream <br>
  14. * Create Time:2015年4月22日 上午11:32:15<br>
  15. * <a href="mailto:peream@gmail.com">peream@gmail.com</a>
  16. * @since 1.0
  17. * @version 1.0
  18. */
  19. public class DB2SqlScript extends MyBaseTest
  20. {
  21. @Test
  22. public void initSql() throws Exception
  23. {
  24. File file = new File("resources/sql/init_data.sql");
  25. String str = FileCopyTools.copyToStr(file);
  26. str = str.replace("commit;", "");
  27. str = str.replace(";", "\nGO");
  28. file = new File("resources/sql/init_data_db2.sql");
  29. FileCopyTools.copy(str, new FileWriter(file));
  30. }
  31. }