5장까지 java8로 프로젝트 진행하다가 aws부터 java11버전으로 변경하였다.
변경 후 생기는 에러 수정 기록.

junit4 >>> junit5

as-is

@RunWith(SpringRunner.class)


to-be

@ExtendWith(SpringExtension.class)

as-is

@After


to-be

@AfterEach

as-is

@Before


to-be

@BeforeEach

as-is

@Before


to-be

@BeforeEach

as-is

org.springframework.boot.web.server.LocalServerPort;


to-be

org.springframework.boot.test.web.server.LocalServerPort;

as-is

drop table if exists [*]user"; expected "identifier"; SQL statement: drop table if exists user [42001-214]


to-be

User.java에 @Table(name = "Users")추가
(h2의 예약어에 user가 존재해서 생기는 에러)

as-is

403에러 & 테스트 에러 (posts table 생성 못함)


to-be

application.properties 수정(main, test 두 개)
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57Dialect
spring.jpa.properties.hibernate.dialect.storage_engine=innodb
spring.datasource.hikari.jdbc-url=~내 url~;MODE=MYSQL

profile
개발 공부노트

0개의 댓글