@@ -0,0 +1,1904 @@
+package io.khasang.wlogs.model;%0Aimport org.springframework.jdbc.core.JdbcTemplate;%0Aimport org.springframework.jdbc.datasource.SimpleDriverDataSource;%0A%0Apublic class CreateDataTable %7B%0A    public static String sqlCheck;%0A%0A    public void sqlInsert() %7B%0A        SimpleDriverDataSource dataSource = new SimpleDriverDataSource();%0A        dataSource.setDriverClass(com.mysql.jdbc.Driver.class);%0A        dataSource.setUsername(%22root%22);%0A        dataSource.setUrl(%22jdbc:mysql://localhost/webstore%22);%0A        dataSource.setPassword(%22root%22);%0A        JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);%0A        System.out.println(%22try to update db...%22);%0A        try %7B%0A            System.out.println(%22Creating tables%22);%0A            /*jdbcTemplate.execute(%22DROP TABLE IF EXISTS products%22);%0A            jdbcTemplate.execute(%22create table products(ID INT NOT NULL,%22%0A                    + %22 pName MEDIUMTEXT NOT NULL, description LONGTEXT)%22);*/%0A//            jdbcTemplate.update(%22INSERT INTO products(ID, pName, description) VALUES(1, 'apple', 'red')%22);%0A//            jdbcTemplate.update(%22INSERT INTO products(ID, pName, description) VALUES(2, 'banan', 'yellow')%22);%0A//            jdbcTemplate.update(%22INSERT INTO products(ID, pName, description) VALUES(3, 'bread', null)%22);%0A            jdbcTemplate.update(%22INSERT INTO products(ID, pName, description) VALUES(4, 'milk', 'natural')%22);%0A            jdbcTemplate.update(%22INSERT INTO products(ID, pName, description) VALUES(5, 'becon', null)%22);%0A            jdbcTemplate.update(%22INSERT INTO products(ID, pName, description) VALUES(6, 'bread', 'black')%22);%0A            sqlCheck = %22db updated%22;%0A        %7D catch (Exception e) %7B%0A            sqlCheck = %22Have error: %22 + e;%0A            System.err.println(sqlCheck);%0A        %7D%0A    %7D%0A%0A    public String sqlInsertCheck() %7B%0A        CreateDataTable sql = new CreateDataTable();%0A        sql.sqlInsert();%0A        return sqlCheck;%0A    %7D%0A%7D%0A

add CreateDataTable