Checkpoint
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
package com.plannaplan.configutils;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.plannaplan.models.FileData;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class FileToDatabaseMigratorTest {
|
||||
@Test
|
||||
public void shouldInsertToDatabase() {
|
||||
FileToDatabaseMigrator migrator = new FileToDatabaseMigrator();
|
||||
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("Zajecia.xlsx");
|
||||
FileReader r = new FileReader(inputStream);
|
||||
FileData d = r.read();
|
||||
migrator.migrate(d);
|
||||
}
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
|
||||
spring.datasource.url=jdbc:mysql://172.20.0.2:3306/test
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=yes&characterEncoding=UTF-8
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=example
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.jpa.open-in-view=true
|
||||
spring.jpa.hibernate.ddl-auto=create-drop
|
||||
spring.jackson.serialization.fail-on-empty-beans=false
|
||||
|
||||
server.port=1285
|
Reference in New Issue
Block a user