์ ์ฒด ๊ธ76 [Spring] Spring boot ๋์ ์๋ฆฌ Spring boot๋ก ๊ฐ๋ฐ์ ํ์ง ๋ฒ์จ 3๋ ์ด ๋๋ค.ํ์ง๋ง Spring boot๋ Request์ ๋ฐ์์ ๋ ์ด๋ค ๊ณผ์ ์ ๊ฑฐ์ณ Responseํ๋์ง ๊ธฐ๋ณธ์ ์ธ ๋์ ์๋ฆฌ๋ฅผ ๋ชจ๋ฅธ๋ค.๊ทธ๋์ ํ๋ฒ ๊ฐ๋ตํ ์์๋ณด์๋ค!๋จผ์ ์์์ผํ๋ ์ง์์ด ์๋ค.1. ์ฌ์ ์ง์๋๋ณด๊ธฐweb.xmlContextLoaderListerServlet & Servlet ContainerFrontControllerRequestDispatcherDispatcherServletApplicationContextMessageConverterViewResolverweb.xmlSpring framework ๋์์ ์ํ ๋ชจ๋ ์ด๊ธฐ ์ค์ ๋ค์ด ๋ค์ด์๋ค. ๋ํ์ ์ธ ์ค์ ์ ์๋์ ๊ฐ๋ค.ServletContext์ ์ด๊ธฐ ํ๋ผ๋ฏธํฐSession ์ ํจ์๊ฐ ์ ๋ณดMi.. 2024. 4. 26. [Spring] ์ ์ด์ ์ญ์ - IoC(Inversion of Control) IoC๋? IoC : Inversion of Control (์ ์ด์ ์ญ์ ) IoC๋ ์์กด์ฑ ์ฃผ์ (DI)๋ก ์๋ ค์ ธ์๋ค. Spring์ Bean์ ์์ฑํ๊ณ ์์กด์ฑ์ ๊ด๋ฆฌํ๊ณ , ๊ฐ๋ฐ์ ๋์ ๋ฉ๋ชจ๋ฆฌ์์ ๊ด๋ฆฌํ๋ค. ๊ฐ๋ฐ์๊ฐ ๊ฐ๋ฐ์๋ง ๋ชฐ๋ ํ ์ ์๋๋ก ํ๋ ์์ํฌ๊ฐ ๋์ ๊ด๋ฆฌํด์ฃผ๋ ๊ฒ์ด๋ค. ๊ฐ๋จํ๊ฒ ์์ฝํ์๋ฉด, Spring์ด ๊ด๋ฆฌํ๋ ๊ฐ์ฒด๋ฅผ ๊ฐ์ ธ์ ์ฌ์ฉํ๋ ๊ฒ์ ๋งํ๋ค. 1. IoC Container๋? Spring์๋ IoC๋ฅผ ๋ด๋นํ๋ ์ปจํ ์ด๋๊ฐ ์๋ค. Spring์ด ๊ด๋ฆฌํ๋ Bean ์์ฑ ๋ฐ ์ค์ ๋ฐฉ๋ฒ ๋ฑ์ ๋ค๋ฃจ๋ Configuration Metadata๊ฐ ์กด์ฌํ๋ค. IoC Container๋ฅผ Spring Container๋ผ๊ณ ๋ ํ๋ค. Spring IoC Container์์ ๊ด๋ฆฌ๋๋ ๊ฐ์ฒด๋ฅผ Bean์ด๋ผ๊ณ ํ๋ค.. 2024. 3. 10. Spring๊ณผ Spring Boot๋? Java ๊ฐ๋ฐ์๊ฐ ํจ๊ป ๊ณต๋ถํด์ผ ํ๋ ํ๋ ์์ํฌ๋ Spring๊ณผ Spring Boot์ด๋ค. ๊ฐ์ ๊ฒ ๊ฐ์ผ๋ฉด์๋ ์๋ก ๋ค๋ฅธ ๋ ํ๋ ์์ํฌ์ ๋ํด์ ์์๋ณธ๋ค. ๊ฒฐ๋ก ๋ถํฐ ์ ์ด๋ณด์๋ฉด Spring์ ์ํฐํ๋ผ์ด์ฆ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ํ ๊ฐ๋ฐ ํ๊ฒฝ(ํ)์ ์ ๊ณตํด ์ฃผ๋ ๊ฒ์ด๊ณ Spring Boot๋ Spring์ ๋จ์ ์ ๋ณด์ํด ๊ฐ๋ฐ์๊ฐ ๋น์ฆ๋์ค ๋ก์ง ๊ฐ๋ฐ์๋ง ์ง์คํ ์ ์๊ฒ ํด์ฃผ๋ ๊ฑฐ๋ค. ์ฌ๊ธฐ์ ์ ์ ์๋ ๊ฒ์ Spring Boot์๋ Spring์ด ํฌํจ๋์ด ์๋ค๋ ๊ฒ์ด๋ค. 1. Spring์ ๋ฑ์ฅ ์ํํธ์จ์ด ๋ถ์ผ๊ฐ ๋ฐ์ ํ๋ฉด์ ์ํธ๋ผ์ด์ฆ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ ์ ๋ณต์กํด์ก๊ณ ๊ฐ๋ฐ์๋ค์ ์ ์ ์ฌ์ฉ์์ ์์ฒญ์ ๋์์ ์ฒ๋ฆฌํด์ผ ํ๋ ๋ฑ์ ์๋น์ค ์์ ์ฑ, ๋ณด์, ์ฑ๋ฅ ๋ฑ์ ๊ณ ๋ คํ๊ฒ ๋์๋ค. ์ ์ฐจ ๊ธฐ๋ฅ ๊ฐ๋ฐ์๋ง ์ง์คํ๊ธฐ ํ๋ค์ด์ก๊ณ ์ด๋.. 2024. 3. 10. [Spring boot] warning: unknown enum constant When.MAYBE ๋๋ณด๊ธฐ ํ๊ฒฝ spring boot v3 gradle java 17 ๐ซ ํ์ ์ด๋๋ ๋ถํฐ ๋น๋ํ ๋ ์๋ ๊ฒฝ๊ณ ๋ฉ์์ง๊ฐ ๊ณ์ ์ฌ๋ผ์๋ค.. ์๋ฌ๋ ์๋์ง๋ง ๋งค์ฐ ๊ฑฐ์ฌ๋ฆฐ๋ค. warning: unknown enum constant When.MAYBE reason: class file for javax.annotation.meta.When not found โ๏ธ ์์ธ @Nullable ์ด๋ ธํ ์ด์ ์ ์ฌ์ฉํ๋ฉด์ ๋ฐ์ํ๋ ๋ฌธ์ ๋ก ์ด ๊ฒฝ๊ณ ๋ javax.annotation.meta.When ํ๋ก์ ํธ ๋ฐํ์์์ ์ด๊ฑฐํ์ ์ฌ์ฉํ ์ ์๊ธฐ ๋๋ฌธ์ ๋ฐ์ํ๋ค๊ณ ํ๋ค. ๐ ๏ธ ํด๊ฒฐ ๋ฐฉ์ ์ด๋ฅผ ์์ ํ๋ ค๋ฉด Google์ JSR305๋ฅผ ์ถ๊ฐํ๋ฉด ๋๋ค. build.gradle์ ์์กด์ฑ ์ถ๊ฐ dependencies { implementation.. 2023. 10. 13. [PostgresSQL] ์ธ๋ถ์ ์ ํ์ฉ (Linux CentOS7) 1. ์ฌ์ ์์ ๋ฐ ํ์ธ PostgresSQL ์ค์น PGDATA ๋๋ ํ ๋ฆฌ ๊ฒฝ๋ก ํ์ธ CentOS default : /var/lib/pgsql/{version}/data 2. postgresql.conf ์ค์ postgresql.conf์์ listen_addresses='localhost' ์ฃผ์ ์ ๊ฑฐ ํ '*'๋ก ๊ฐ์ ๋ฐ๊พธ๊ณ port=5432 ๋ผ์ธ ์ฃผ์ํด์ ํ๋ค. vi /var/lib/pgsql/{version}/data/postgresql.conf listen_address='*' port=5432 3. pg_hba.conf ์ค์ ์๋ ๋ช ๋ น์ด๋ฅผ ์คํํ์ฌ pg_hba.conf์ ์ ์ ํ์ฉ ๊ท์น์ ์ถ๊ฐํ๋ค. echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/{ve.. 2023. 9. 27. [Spring boot] Generating equals/hashCode implementation but without a call to superclass โน๏ธ Development Environment Spring boot v3.0.1 Gradle v7.6 Java v17 Lombok ๐ซ ํ์ Spring boot gradle build์ ์๋ warning์ ๋งค ํ๋ก์ ํธ๋ง๋ค ์์ฃผ ๋ง๋๋ค. warning์ด๊ธฐ์ ๋น๋์ ๋ฌธ์ ๋ ์์ง๋ง, ํด์ํด์ฃผ๋ ๊ฒ์ด ์ข๋ค. ๊ณ์ ๊น๋จน๊ธฐ ๋๋ฌธ์ ๊ธฐ๋กํ๋ค.. warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' t.. 2023. 9. 26. [Keycloak] Keycloak์ด๋? & ๊ฐ๋จํ ์ค์น ๋ฐ ํ ์คํธ ๊ณต์ ์ฌ์ดํธ : https://www.keycloak.org/ 1๏ธโฃ (What) Keycloak์ด๋? Keycloak์ RedHat ์ฐํ IAM ์๋ฃจ์ ์ด๋ค. โ IAM ์๋ฃจ์ (Identity and ACcess Management Soluthion) ํ์๊ฐ์ , ๋ก๊ทธ์ธ ์ธ์ฆ, ์ธ๊ฐ, ๋ก๊ทธ์ธ ์ด๋ ฅ๊ด๋ฆฌ, ํ์ ์ ๋ณด ์์ , ํํด ๋ฑ.. ์ธ์ฆ/์ธ๊ฐ ๊ธฐ๋ฅ๋ค์ด ๋ฏธ๋ฆฌ ๋ค ๊ตฌํ๋์ด ์๋ ์๋ฃจ์ ์ ๋งํ๋ค. ๋ํ์ ์ผ๋ก Keycloak, AWS Cognito๊ฐ์ ์๋น์ค๊ฐ ์๋ค. 1. ํน์ง SSO (Single-sign-on)๋ฅผ ์ ๊ณตํ๋ค. Restful API ์ง์ ๋ฐ Custom API๋ฅผ ์ถ๊ฐํ ์ ์๋ค. Java๋ก ๊ฐ๋ฐ๋ ์คํ์์ค์ด๋ค. https://github.com/keycloak/keycloak\ 2. ์ ๊ณต ๊ธฐ๋ฅ .. 2023. 9. 11. [Android Build failed] Keystore file ... not found for signing config 'debug'. (MAC) ๋๋ณด๊ธฐ ํ๊ฒฝ mac react native android yarn build ๐ซ ์๋ฌ ๋ฐ์ ์ํฉ React-native Android ๋น๋ Failed Keystore file '.../ํ์ผ๋ช .keystore' not found for signing config 'debug'. BUILD FAILED in 22s error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8.. 2023. 9. 7. [์บก์ฌ์ด์ ํ์] ์ฒญ์๊ณ ์ถ ํ์ ํ๊ธฐ & ๊ณผ์ ์ฒญ์๊ณ ์ถ ํ์์ ๊ฑธ๋ ธ๋ค..๐ถ๏ธ 2023.09.02 ์ฒญ์๊ณ ์ถ ํ์์ ๊ฑธ๋ ธ๋ค.. ์ฒญ์๊ณ ์ถ ํ์์ด๋.. ์บก์ฌ์ด์ ํ์์ด๋ผ๊ณ ํ๋ฉฐ ๊ฐํ ์๊ทน๋ฌผ์ง์ธ ์บก์ฌ์ด์ ,์๋ฆฌ์ ,ํผํ๋ฆฐ ๋ฑ๊ณผ ๊ฐ์ ์ฑ๋ถ์ด ํผ๋ถ์ ๋ฟ๊ฒ ๋๋ฉด์ ๋ฐ์ํ๋ ํํ์ ํ์์ด๋ค. ๊ณ ์ถ๋์ด, ๊ฒจ์, ๋ง๋, ์ฒญ์๊ณ ์ถ, ํ์ถ ๋ฑ์ผ๋ก ๋ฐ์ํ๋ฉฐ ์บก์ฌ์ด์ ํ์์ ์ฆ์์ผ๋ก๋ ๋ ธ์ถ๋ ํผ๋ถ์์ ์ด๊ฐ, ํ๋๊ฑฐ๋ฆผ, ํต์ฆ๊ณผ ๊ฐ๋ ค์์ฆ์ด ์๋ค. ์งง๊ฒ๋ ๋ช์๊ฐ, ๊ธธ๊ฒ๋ 1~2์ผ ์ ๋ ์ง์๋ ์ ์๋ค. ์บก์ฌ์ด์ ํ์์ ์ค์ ํ์์ด ์๋ ํํ์ ๋ฐ์์ผ๋ก ์ธํ ํต์ฆ์ด ๋์ ์ ๋ฌ๋๋ฉด์ ๋๊ฐ ํ์์ ์ ๊ฒ๊ณผ ๊ฐ์ ํต์ฆ์ผ๋ก ์ธ์ํ๋ ๊ฒ์ด๋ค. ์บก์ฌ์ด์ ํ์์ ๋ํด ๋ชฐ๋๋ ๋๋ ๊ฒ์์ด ๋งจ์์ผ๋ก ์ฒญ์๊ณ ์ถ 10๊ฐ๋ฅผ ์ด์ฌํ ๋ค๋ฌ์๊ณ ๊ผฌ๋ฐ 24์๊ฐ์ ๊ฝ ์ฑ์ ์ง์ฅ์์ ๋ณด๋๋ค. ์ด ๊ณผ์ ์ ์์ ์๊ฐ ์์ด์... 2023. 9. 4. ์ด์ 1 2 3 4 ยทยทยท 9 ๋ค์