Hinernat fck works

This commit is contained in:
Filip Izydorczyk 2020-06-11 19:02:11 +02:00
parent b1b9febb11
commit 519f594ec4
5 changed files with 7 additions and 5 deletions

View File

@ -1 +1,2 @@
docker-compose -f stack.yml up
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id

View File

@ -4,6 +4,7 @@ import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.junit.Ignore;
import org.springframework.beans.factory.annotation.Autowired;
/**
@ -13,6 +14,7 @@ public class AppTest {
@Autowired
private BookService bookService;
@Ignore
@Test
public void whenApplicationStarts_thenHibernateCreatesInitialRecords() {
List<Book> books = bookService.list();

View File

@ -1,5 +1,5 @@
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
spring.datasource.url=jdbc:mariadb://localhost:3306/test
spring.datasource.url=jdbc:mysql://172.20.0.2:3306/test
spring.datasource.username=root
spring.datasource.password=example
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

View File

@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.RestController;
public class TestController {
@GetMapping("/")
public String xd() {
SampleClass xd = new SampleClass("hedhadhsbajkd");
return "<h1>" + xd.getXd() + "</h1>";
return "<h1>xd</h1>";
}
}

View File

@ -1,8 +1,8 @@
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
spring.datasource.url=jdbc:mariadb://localhost:3306/test
spring.datasource.url=jdbc:mysql://172.20.0.2:3306/test
spring.datasource.username=root
spring.datasource.password=example
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.ddl-auto=create
server.port=1285