JPA์ save(), saveAll(), saveAllAndFlush() ๋ฉ์๋๋ค์ ์์์ฑ ์ปจํ
์คํธ ๊ฐ๋
๊ณผ ํจ๊ป ํจ์จ๊ณผ ์ฑ๋ฅ์ ๋ํ ์ฐจ์ด๋ฅผ ์์๋ณด๊ฒ ๋ค.1. save() ๋จ๊ฑด ์ํฐํฐ๋ฅผ ์ ์ฅํ๋๋ฐ ์ฌ์ฉ๋๋ค. @Transactional@Overridepublic S save(S entity) { Assert.notNull(entity, "Entity must not be null"); if (entityInformation.isNew(entity)) { entityManager.persist(entity); return entity; } else { return entityManager.merge(entity); }} ๋จผ์ isNew() ๋ฉ์๋๋ฅผ..
์นด์นด์ค ๊ณต์ ๋ฌธ์๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์์ฑhttps://developers.kakao.com/docs/latest/ko/kakaologin/common๊ตฌํ ์ฝ๋https://github.com/DDonghyeo/kakao-login์ฐธ๊ณ ์ด ๊ธ์ ์ ์ฐจ์ ๋ฐ๋ผ ์ฝ๋๋ฅผ ์์ฑํด ๋๊ฐ๋ ๊ณผ์ ์
๋๋ค. ์ ์ฒด ์ฝ๋๋ ๊นํ๋ธ๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.ํ๋ก ํธ(ํด๋ผ์ด์ธํธ) ๋ถ๋ถ์ thymeleaf๋ก ๊ตฌํํ์์ต๋๋ค.Spring Boot 3.x.x ๋ฒ์ ๊ธฐ์ค์
๋๋ค. ๋จผ์ , ์นด์นด์ค ๋ก๊ทธ์ธ ๋ฐฉ์์ ๋ํด ์ดํดํ๊ณ ์์ํด์ผ ํ๋ค.์๋์ฒ๋ผ ์ ๋ฆฌํ๊ณ ์งํํ๊ฒ ๋ค.์นด์นด์ค ๋ก๊ทธ์ธ ์์ฒญ์ฌ์ฉ์๊ฐ ๋ก๊ทธ์ธ์ ์์ฒญํ๋ค. ๋ฏธ๋ฆฌ ์ค์ ํด๋ client_id (REST API KEY) + redirect URI ๊ฐ ์ค์ ๋ ๋งํฌ๋ก ๋ค์ด๊ฐ๋ค.์ฌ์ฉ์๊ฐ ์นด์นด์ค ๋ก๊ทธ์ธ์นด์นด์ค ๋ก๊ทธ์ธ ์ฐฝ..
0. CORS๊ฐ๋ฐํ ๋ ์ ๋ง ๋ง์ด ๋ง์ฃผ์น๊ฒ ๋๋ CORS๋ฅผ ์ ๋๋ก ์์๋ณด์. CORS (Cross-Origin Resource Sharing)HTTP ํค๋๋ฅผ ์ด์ฉํ์ฌ ์น ์ ํ๋ฆฌ์ผ์ด์
์ ๋ํ ์์์ ๋ค๋ฅธ ์ถ์ฒ์์ ์ ๊ทผํ ์ ์๋๋ก ๊ถํ์ ๋ถ์ฌํ๋ ์ ์ฑ
. ์ฌ๊ธฐ์ '์ถ์ฒ'๋, ๋๋ฉ์ธ, ํ๋กํ ์ฝ, ํฌํธ๋ฅผ ๋ปํ๋ค. ์์์ ํธ์ถํ ํด๋ผ์ด์ธํธ์ ์์์ ๋ด๋ฑ์ ์ฌ์ดํธ๊ฐ ๋๋ฉ์ธ, ํ๋กํ ์ฝ, ํฌํธ๊ฐ ๋ค๋ฅด๋ค๋ฉด "๋ธ๋ผ์ฐ์ " ์์ ๋ง๋๋ค๋ ๊ฒ์ด๋ค. ๋ง์ฝ, CORS ์ ์ฑ
์ด ์๋ค๋ฉด..ํดํน ์๋๋ฆฌ์ค #11. ์ฌ์ฉ์๊ฐ ์ด๋ค ํดํน์ฉ ์ฌ์ดํธ์ ์ ์ํ๋ค.2. ํด๋น ํดํน์ฉ ์ฌ์ดํธ์์ ์คํ๋๋ js์์๋ ์ฌ์ฉ์ ๋ธ๋ผ์ฐ์ ์ ์๋ ์ฟ ํค, ์ธ์
๋ฑ์ ์ด์ฉํ์ฌ ๋ค๋ฅธ ์ฌ์ดํธ์ ์ธ์ฆ, ์ธ๊ฐ๋ฅผ ์๋ํ๋ค.3. ํดํน์ฉ ์ฌ์ดํธ๋ CORS ์ ์ฑ
์ด ์๋ค๋ฉด ๋ค๋ฅธ ..
3.2.4 ๊ณต์๋ฌธ์ https://docs.spring.io/spring-data/redis/reference/ Spring Data Redis :: Spring Data Redis Costin Leau, Jennifer Hickey, Christoph Strobl, Thomas Darimont, Mark Paluch, Jay Bryant Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that docs.spring.io 0. Depdency //Redis imple..
https://docs.spring.io/spring-kafka/reference/testing.html Testing Applications :: Spring Kafka We generally recommend that you use the rule as a @ClassRule to avoid starting and stopping the broker between tests (and use a different topic for each test). Starting with version 2.0, if you use Spring’s test application context caching, you can also docs.spring.io ๊ณต์ ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํด์ ์์ฑํ๋ค. ์ต๊ทผ ํ๋ก์ ํธ์์ Kafka..
[์ด์ ํฌ์คํ
] RDB๋ฅผ ์ฌ์ฉํ๋ ์ ํ๋ฆฌ์ผ์ด์
์์ ํจ๊ณผ์ ์ธ ๋ฐ์ดํฐ ์ ๋ฌ ๋ฐฉ๋ฒ 2023.11.04 - [BackEnd/Spring] - [Spring] ๋ถ์ฐ ์์คํ
์์ ํจ๊ณผ์ ์ธ ๋ฐ์ดํฐ ์ ๋ฌ ๋ฐฉ๋ฒ (1) - Transaction Outbox Pattern & Polling Publisher Pattern [์ด์ ํฌ์คํ
] RabbitMQ๋ฅผ ์ฌ์ฉํ๋ ์ ํ๋ฆฌ์ผ์ด์
์์ ํจ๊ณผ์ ์ธ ๋ฐ์ดํฐ ์ ๋ฌ ๋ฐฉ๋ฒ 2023.11.10 - [BackEnd/Spring] - [Spring] ๋ถ์ฐ ์์คํ
์์ ํจ๊ณผ์ ์ธ ๋ฐ์ดํฐ ์ ๋ฌ ๋ฐฉ๋ฒ (2) - RabbitMQ 2. Kafka๋ฅผ ์ฌ์ฉํ ์ ๋ฌ ๋ฐฉ๋ฒ 2-1. Producer Confirm ์๋๋ Producer Confirm์ ๊ตฌํํ ํด๋์ค์ด๋ค. - Spring Boot 2 ๋ฒ์ @Slf4j ..