1. https://๋๋ฉ์ธ์ฃผ์ ์น๋ฉด http://ip์ฃผ์๋ก ์ด๋๋๋ ๋ฌธ์ ๋๋ฌธ์ ๊ณ์ ์ค๋ฅ๋จ--> mixed content ์ค๋ฅ, https ์์ http๋ก ์์ฒญ์ ๋ณด๋ด๋ฉด ๋ฐ์ํ๋ ์ค๋ฅ์ธ๋ฐ ๊ตฌ๋งคํ ๋๋ฉ์ธ๊ณผ ssl ์ธ์ฆ์ ์ ์ฉ๊น์ง ๋ค ํด์คฌ๊ณ ํ๋ก์ ์ค์ ๊น์ง ํ๋๋ฐ ๋ ์ด์ ๋ญ ์์ ํด์ผ ๋ ์ง ๊ฐ๋ ์ ์ด๋ฐฑ์๋์์๋ ์๋ชป๋ ๋ถ๋ถ์ด ์์๊ณ ํ๋ก ํธ์์ ๋ญ ๊ณ ์ณค๋ ์ง ๊ฒฐ๊ตญ์ ํด๊ฒฐ์ด ๋จ--> https://๋๋ฉ์ธ์ฃผ์/api ๋ก ์์ฒญ๋ณด๋ด๋ฉด ๋ฐฑ์๋ ์๋ฒ๋ก ์ ๋์ด๊ฐ 2. ๊ทธ๋ฌ๋๋๋ง ์ด์ cors์๋ฌ ๋ฐ์--> spring security ์ฝ๋์์๋ cors ์ค์ ๋ถ๋ช
๋ค ํด์คฌ๋๋ฐ ์ค๋ฅ๋จ.. --> ๊ฒ์ํด๋ณด๋ nginx ์์๋ ์ค์ ์ ํด์ค์ผ ๋์--> n์๊ฐ๋์ ์ฝ์งํ๋ฉด์ confํ์ผ ์์ ํ๊ณ ์ฌ์คํํ๊ณ ๋ฌดํ๋ฐ๋ณต ํ๋..
ํด๋ผ์ฐ๋ ์๋ฒ์ ์์๋ฐ์ด๋ 443 ํฌํธ๊ฐ ์ ์ด๋ ค์์์ ์ด์ด์ฃผ๋๊น ๋๋ค
> Task :testApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1786 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hi..
Spring Security ์ jwt๋ฅผ ์ฌ์ฉํ์ฌ ๋ก๊ทธ์ธ์ ํด์ token ๋ฐํํด์ค ๋ ๋ฐ์ํ ์ค๋ฅ ECDSA signing keys must be PrivateKey instances return Jwts.builder() .setSubject(authentication.getName()) .claim(AUTHORITIES_KEY, authorities) .signWith(key, SignatureAlgorithm.ES512) .setExpiration(validity) .compact(); ์ฌ๊ธฐ์ .signWith(key, SignatureAlgorithm.ES512) ์ด ๋ถ๋ถ์ `SignatureAlgorithm.ES512` ์์ `SignatureAlgorithm.HS512` ๋ก ๋ฐ๊ฟ์ฃผ๋ฉด ๋จ
@RequestBody List messageIds ํ์์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์
๋ ฅ๋ฐ๋ ๋ฉ์๋ { "messageIds": ["20240203185745950419", "20240205104508440444"] } ์ด json ํํ๋ก ๋ฃ์ด์ ํฌ์คํธ๋งจ ์คํํด๋ณด๋ ์ค๋ฅ๊ฐ ๋ฐ์ํจ JSON parse error: Cannot deserialize value of type `java.util.ArrayList` from Object value (token `JsonToken.START_OBJECT`)]โ ใ
3ใ
..? ํด๊ฒฐ๋ฐฉ๋ฒ ["20240203185745950419", "20240205104508440444"] ๋ณ์๋ช
์จ์ค ํ์ ์์ด ๊ฑ ์ด๋ ๊ฒ ๋
๋ค ๋ฃ์ผ๋ฉด ๋๋ค ์ํจํจ ์ฝ์ง์ ์ด์ ๊ทธ๋ง
table์ pk๋ `GENERATED ALWAYS AS IDENTITY` ๋ก ์ค์ ์ด ๋์ด ์์ ๊ฐ์ ๋ฃ์ด์ค ๋ pk๋นผ๊ณ ๊ฐ์ ๋ฃ์ด์ค save๋ฅผ ํด์ฃผ๋ ค๊ณ ํ์ ids for this class must be manually assigned before calling save(): ์ค๋ฅ๊ฐ ๋ฐ์ ํด๊ฒฐ๋ฐฉ๋ฒ ์ํฐํฐ pkํ๋ @Id ์ด๋
ธํ
์ด์
๋ฐ์ `@GeneratedValue(strategy = GenerationType.IDENTITY)` ๋ฅผ ์ถ๊ฐํจ
java.lang.IllegalStateException: Duplicate key 10 List to Map ์ Key ๊ฐ์ด ์ค๋ณต์ผ ๊ฒฝ์ฐ Duplicate Key์๋ฌ ๋ฐ์ `mergeFunction` ์ `(existing, replacement) -> existing` ๋ก ์ค์ ํด์ฃผ์ ์ค๋ณต๋ ํค๊ฐ ์์ ๋ ๊ธฐ์กด ๊ฐ์ ์ ์งํ๊ณ ์๋ก์ด ๊ฐ์ ๋ฌด์ํ๋ ๋ฐฉ์ Map contactNumberMap = contactNumbers.stream() .collect(Collectors.toMap( NbbContactNumber::getContactTypeCd, NbbContactNumber::getCommNo, (existing, replacement) -> existing));
๐์ค๋ฅ No EntityManager with actual transaction available for current thread - cannot reliably process 'merge' call ์ผ๋ถ ์ปฌ๋ผ์ ์
๋ฐ์ดํธ ํ๋ ๋ฉ์๋๋ฅผ ์คํํ๋ ค๊ณ ํ๋๋ฐ ๋ฐ์ํ ์ค๋ฅ โ๏ธ์์ธ ๊ธฐ๋ณธ์ ์ผ๋ก JPA๋ transaction์ ๊ธฐ๋ฐ์ผ๋ก ์๋ํ๊ฒ ๋์ด์์ transaction ๋จ์์ ๋ฐ๋ผ 1์ฐจ ์บ์์์ญ์ ์๋ ๊ฐ์ฒด๋ค์ด db์ flush๋์ด ์์ํ๋๊ธฐ ๋๋ฌธ ๊ทธ๋ฌํ ์์ ์์
์ ํ๋ persist() ๋ฉ์๋์ ๊ฐ์ฒด๊ฐ ๋ค์ด๊ฐ์ผ๋ ๊ฐ๋ฅํ transaction์ด ์กด์ฌํ์ง ์์๊ธฐ์ ๋ฐ์ํ ์ค๋ฅ โ๏ธํด๊ฒฐ ํด๋น ์์
์ ์คํํ๋ ๋ฉ์๋์ `@Transactional` ์ ์ธํด์ค