error Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "create table [*]order (id bigint generated by default as identity, completed boolean not null, title varchar(255) not null, todo_order bigint not null, primary key (id))"; expected "identifier"; SQL statement: create table order (id bigint generated by default as identity, completed boolean not null, title v..

๋ฌธ์ DTO์ ์ํฐํฐ๋ฅผ ๋งคํํ๊ธฐ์ํด์ mapstruct๋ฅผ ์ฌ์ฉํ๋๋ฐ ๊ณ์ํด์ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค. ์ด๋ฐ์์ผ๋ก userName๊ณผ email์ ์์ชฝ์์ ์ฐพ์์์ ์์์ ๋งคํ์ ํด์ค์ผ ๋๋๋ฐ ์ ๋ง ์ด์ํ๊ฒ๋ Member์ ๋ํดํธ ์์ฑ์๊ฐ ์๋๋ฐ๋ new Member(); ์ด๋ฐ์์ผ๋ก meber๋ฅผ ๋ฆฌํดํด์คฌ๋ค. ์ด๊ฒ์ ๊ฒ ์ ์ฉ์ ํ๋๋ผ๊ณ ํ์คํ ์ด๋ค๋ฌธ์ ์ธ์ง๋ ์ฐพ์๋ด์ง๋ชปํ์ง๋ง ๊ฐ์ฅ ์ ๋ ฅํ๊ฑด ๋กฌ๋ณต๊ณผ mapsturct์ dependencies ์์์ธ๊ฒ๊ฐ๋ค. (์ข๋ ํ์ธ์ด ํ์ํ๋ค.) ๋กฌ๋ณต์ด mapstruct ๋ณด๋ค ๋ค์ ์ ์ธ๋์ด์์ผ๋ฉด ์๋ฌ๊ฐ ๋ฐ์ํ ์๋ ์๋ค๊ณ ํ๋๋ฐ ํ์คํ์ง๋ ๋ชจ๋ฅด๊ฒ ๋ค. ์ฐธ๊ณ ์ฌํญ 1. ๋ณํ๊ณผ์ ์์ ๋ณํ ์ ์ ๊ฐ์ฒด์์ ๊ฐ์ ๊บผ๋ด์์ผ ํ๋ฏ๋ก ๋ณํ ์ ๊ฐ์ฒด(source) ์๋ Getter๊ฐ ์์ด์ผ ํ๋ค. 2. ๋ณํ๊ณผ..
@NotBlank @Email private String email; @NotBlank(message = "์ด๋ฆ์ 1๊ธ์ ์ด์ ์ ๋ ฅ๋์ผํฉ๋๋ค.") private String name; @Pattern(regexp = "^010-\\d{3,4}-\\d{4}$", message = "ํด๋ํฐ ๋ฒํธ๋ 010์ผ๋ก ์์ํ๋ 11์๋ฆฌ ์ซ์์ '-'๋ก ๊ตฌ์ฑ๋์ด์ผ ํฉ๋๋ค.") private String phone; @NotBlank private long password; ์์ ๊ฐ์ด Post์์ฒญ์ ๋ํ DTO๋ฅผ ๊ตฌ์ฑํ์๋๋ฐ Post ์์ฒญ์์ ์๋ฌ๊ฐ ๋ฐ์ํ์๋ค. javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constr..

๐Error Log Gradle๋ก Junit ์ค์ต์ ์งํํ๋์ค 2๊ฐ์ ํ ์คํธ๊ฐ ์ฑ๊ณต์ ํ๋๋ฐ ๋ก๊ทธ์์ ๋นจ๊ฐ๊ธ์จ๋ก org.junit.platform.launcher.core.EngineDiscoveryOrchestrator lambda$logTestDescriptorExclusionReasons$7 ์๋ฐ ์๋ฌ๊ฐ ๋ฐ์ํ์๋ค... ์ฐพ์๋ณด๋ ์ธํ ๋ฆฌ์ ์ด ์ค์ ์ด ๋ฌธ์ ์ธ๊ฒ ๊ฐ์๋ค. ๋น๋์์ Junit์ผ๋ก ํ ์คํธ๊ฐ ์งํ๋์ด์ผํ๋๋ฐ Gradle๋ก ๋์ด์ ๋ฐ์ํ๋ ๋ฌธ์ ์ด๋ค. ํด๊ฒฐ๋ฐฉ๋ฒ 1. Settings -> Build, Execution, Deployment -> Build Tools -> Gradle ์ด๋ 2. Build and run using / Run tests using ์ Intellij IDEA๋ก ๋ณ๊ฒฝ
๐Error Log DTO Validation ์ ์ฉ์ค์ ๋ฌธ์์ด์ ๊ฒฝ์ฐ์ public class CoffeePostDto { @NotBlank(message = "ํ๊ธ์ด๋ฆ์ ๊ณต๋ฐฑ์ด ์๋์.") @Pattern(regexp = "^[ใฑ-ใ ๊ฐ-ํฃ]+$") private String korName; @NotBlank(message = "์์ด์ด๋ฆ์ ๊ณต๋ฐฑ์ด ์๋์.") @Pattern(regexp = "^[A-Za-z]+( [A-Za-z]+)*$") private String engName; @Pattern(regexp = "^(1\d{2}|[2-4]\d{3}|50000)$") private Integer price; } ๋ค์๊ณผ ๊ฐ์์์ผ๋ก ์ ์ฉํ์๋๋ฐ ์๋ฌ๊ฐ ๋ฐ์ํ์๋ค. ์์ korName๊ณผ engName์ ๊ฒฝ์ฐ ..
๐Error Log ๋ฐ์ผ๋ฆฌ์ฝ๋ฉ ๋ฌธ์ ๋ฅผ ํ๋์ค if(element.isBlank())๋ฅผ ์ฌ์ฉํ๋ค. ๋ก์ปฌ์์๋ ์ ์์ ์ผ๋ก ๋์๊ฐ์ง๋ง ์ฝํ๋ฆฟ์์๋ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค. ์ฐพ์๋ณด๋ ์๋ฐ ๋ฒ์ ๋ฌธ์ ์๋ค..! isBlank()๊ฐ ์๋ฐ11๋ถํฐ ์ฌ์ฉ๊ฐ๋ฅํ๊ฒ๋๋ฌธ... isBlank() : ์ฃผ์ด์ง ๋ฌธ์์ด์ด ๋น๋ฌธ์์ด์ด๊ฑฐ๋, ๊ณต๋ฐฑ(" ")์ ๊ฐ๋ ๋ฌธ์์ด์ด๋ฉด true, ์๋๋ฉด false isEmpty() : ์ฃผ์ด์ง ๋ฌธ์์ด์ด ๋น๋ฌธ์์ด์ด๋ฉด true, ์๋๋ฉด false. String str1 = "strstr"; String str2 = " "; String str3 = ""; System.out.printf("empty? %b, blank? %b\n", str1.isEmpty(), str1.isBlank()); System.out.pri..
๐Review int max = 0; //MAX๋ฅผ 0์ผ๋ก ์ด๊ธฐํ for(int i=0;i