SpringBoot 2.7+ CORS ์ด์ ๋ฐ ํด๊ฒฐ๋ฐฉ๋ฒ ๊ฐ๋จํ๊ฒ ๋ง๋ API ์๋ฒ๋ฅผ ํ ์คํธ ํ๊ธฐ ์ํด ๋ก์ปฌ์์ ๋๋ฆฌ๋ ๋์ค ํด๋น ์ด์๋ฅผ ๋ง๋ฌ๋ค. ๊ตฌ์ฑ์ ๋ค์๊ณผ ๊ฐ๋ค. localhost:8080/users - SpringBoot API Server ์์ ์ ์ ๋ฐ์ดํฐ๋ฅผ ๋ฆฌํด. localhost:8090/index.html - API์๋ฒ๋ก ์์ฒญ์ ๋ณด๋ด๋ ์คํฌ๋ฆฝํธ๊ฐ ์๋ html ํ์ด์ง index.html {{ message }} ๊ฐ๋จํ๊ฒ nginx Docker๋ก ํด๋น ํ์ด์ง๋ฅผ 8090ํฌํธ๋ก ๋์ ๋ค. FROM nginx:alpine COPY . /usr/share/nginx/html ๊ทธ๋ฆฌ๊ณ ๋๋ง์ CORS ์ด์๋ฅผ ๋ง๋ฌ๋ค. ๊ทธ๋ฆฌ๊ณ ์ด๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํด ๊ฒ์ํด๋ณธ ๊ฒฐ๊ณผ ์๋์ ๊ฐ์ ๋ฐฉ๋ฒ์ด ์๋ค. ์ ์ผ ๊ฐ๋จํ๊ฒ ๋ด ํ๋ฉด์์๋ง ์๋์ค๊ฒ ํ๊ณ ์ถ๋ค! https://chrome.g.. [MS-SQL] ๋๋ผ์ด๋ฒ๊ฐ SSL(Secure Sockets Layer) ์ํธํ๋ฅผ ์ฌ์ฉํ์ฌ SQL Sever๋ก ๋ณด์ ์ฐ๊ฒฐ์ ์ค์ ํ ์ ์์ต๋๋ค. ์ค๋ฅ: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid c.. JDK 11 ๋ฒ์ ์ด์ ์ฌ์ฉํ๋ ํ๋ก์ ํธ์์ MSSQL ์ฐ๊ฒฐ ์๋ ์ ์๋์ ๋ฉ์ธ์ง ์ถ๋ ฅ. ๋๋ผ์ด๋ฒ๊ฐ SSL(Secure Sockets Layer) ์ํธํ๋ฅผ ์ฌ์ฉํ์ฌ SQL Sever๋ก ๋ณด์ ์ฐ๊ฒฐ์ ์ค์ ํ ์ ์์ต๋๋ค. ์ค๋ฅ: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" ์์ธ : jdk11 ์ ์ง์ํ๋ mssql ๋๋ผ์ด๋ฒ ๋ฒ์ (10.2์ด์)๋ถํฐ ๊ธฐ๋ณธ์ ์ผ๋ก ์ํธํ๋ฅผ ์ฌ์ฉํ๋๋ก ๋ณ๊ฒฝ๋จ. (https://docs.microsoft.com/en-us/sql/connect/jdbc/release.. [Axios] Vuejs / React ํ๊ฒฝ์์ axios ๋ชจ๋ get/post ํต์ ์๋ฌ 1. ํ๋ก์ ํธ ํ๊ฒฝ - html ๋ฒ ์ด์ค๋ก ํ๋ก ํธ์์ Vuejs ์ฌ์ฉ ์ค - Vuejs ๋ฒ์ 2.6.14 - axios ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฒ์ 0.26.1 2. ๋ฌธ์ ์ํฉ - axios ๋ฅผ ์ด์ฉํ์ฌ ajax ํต์ ์ backend ์ ์งํ. comm.post({ context: 'common_web', url: "/push/token/save", params: { pushToken: token, mobileOs: comm.mobile.os } }, function (data) {}); ์ ์ฝ๋๋ /common_web/push/token/save URL ๋ก POST ์์ฒญ์ ๋ณด๋ด๋ ajax ์ ์ ํจ์์ด๋ค. ํด๋น ํต์ ์ ์คํํ์์ ๋, Response ๋ด์ฉ์ด ์์ ์๋ ์ํฉ์ด ๋ฐ์ํ๋ค. ํน์ง์ผ๋ก๋ Response ์ ๋ด.. Apple M1 Docker Build Error M1 docker preview and keycloak 'image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)' M1 docker preview and keycloak 'image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)' Issue I just downloaded Docker Preview v3.1 https://docs.docker.com/docker-for-mac/apple-m1/ and tried running keycloak. Anyone else running into this i.. In plugin 'com.google.cloud.tools.jib' type 'com.google.cloud.tools.jib.gradle.BuildImageTask' property 'jib.allowInsecureRegistries' of type boolean shouldn't be annotated with @Optional. > Task :project_name:jib FAILED :project_name:jib (Thread[Execution worker for ':' Thread 3,5,main]) completed. Took 0.001 secs. FAILURE: Build failed with an exception. * What went wrong: Some problems were found with the configuration of task ':project_name:jib' (type 'BuildImageTask'). - In plugin 'com.google.cloud.tools.jib' type 'com.google.cloud.tools.jib.gradle.BuildImageTask' property 'j.. [Spring] Driver net.sf.log4jdbc.sql.jdbcapi.DriverSpy claims to not accept jdbcUrl Driver net.sf.log4jdbc.sql.jdbcapi.DriverSpy claims to not accept jdbcUrl ์ค๋ฅ๋ฅผ ๋ง๋ฌ๋ค. ์ต์ด ๋ฐ์ ๊ณผ์ ์ DB ์ฐ๊ฒฐ ์, application.yml ํ์ผ์ DB ์ฃผ์๋ฅผ ์ ์์ผ๋ ํด๋น ์ค๋ฅ๋ฅผ ๋ฑ์ด๋ด๋ ์ํฉ์ด์๋ค. ํ๊ฒฝ์ JDK11 / Spring Boot / Mybatis / HikariCp ์์ผ๋ฉฐ, IDE๋ VS Code ์๋ค. ํด๊ฒฐ ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ์๋ค. 1. ojdbc ์ถ๊ฐ. 2. ์ฃผ์ ์ง์ ํ์ ๋ณ๊ฒฝ ( ๋์ ๊ฒฝ์ฐ์๋ jdbc:log4jdbc:oracle:thin:@{oracle-db-url} # ex ) localhost:3306:utf8 ) ์ฒ๋ผ ํ์์ ๋ง์ถ์ด์ผ ํ์๋ค. log4j2๋ฅผ ์ฌ์ฉํ๋ฉด์, ๋๋ผ์ด๋ฒ ํด๋์ค๊ฐ ๋จ์ oracle .. [ ORACLE ] ORA-02016 ์๊ฒฉ ๋ฐ์ดํฐ๋ฒ ์ด์ค์์๋ start with ํ์ ์ง์๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๋ฌธ์ : ์ค๋ผํด์์ ๋ค๋ฅธ ๊ณณ์์ ์ ๊ณต๋ฐ์ ๋ทฐํ ์ด๋ธ์ START WITH ๋ก ๊ณ์ธต ์กฐํํ๋ ์ฟผ๋ฆฌ ์คํ ์ค "์๊ฒฉ ๋ฐ์ดํฐ๋ฒ ์ด์ค์์๋ start with ํ์ ์ง์๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค." ์ค๋ฅ ๋ฐ์. ์์ธ : DBLINK๋ฅผ ๊ฑธ์ด ์ฌ์ฉ ์ค์ธ ํ ์ด๋ธ ๋๋ ๋ทฐ ๋ฑ์์๋ ํด๋น ๊ตฌ๋ฌธ์ ์ฌ์ฉํ ์ ์์. ํด๊ฒฐ : ํด๋น ๋ทฐ ํ ์ด๋ธ์ ์ฐ๋ฆฌ ์ชฝ ์คํค๋ง๋ก ๋์ผํ๊ฒ ํ ์ด๋ธ ๋ฐ ๋ฐ์ดํฐ๋ฅผ ๋ณต์ฌ ํ์ฌ ์ฌ์ฉ. VS Code Main Class Not Found Exception ํด๊ฒฐ VS Code ์์ Spring Boot Gradle Project ๋ฅผ ๊ฐ๋ฐํ๋ ๋์ค, ์์ ํ๊ฒฝ์ ๋ฐ์คํฌํ์์ ๋ ธํธ๋ถ์ผ๋ก ์ฎ๊ฒผ๋๋ฐ, ์ด์ํ๊ฒ๋ ๋ฐ์คํฌํ ํ๊ฒฝ์์ ์๋ง ๋์๊ฐ๋ ์์ค๋ค์ด, ๋ ธํธ๋ถ ํ๊ฒฝ์์๋ ๋์๊ฐ์ง ์์๋ค. ํ์์ VS Code ๋ด Spring DashBoard ์์ ํ๋ก์ ํธ ์คํ ์, Main Class ๋ฅผ ์ฐพ์ง ๋ชปํ๋ ํ์์ด์๋ค. ๊ฒ์ํด์ ์๋์ ๊ฐ์ ์๋๋ฅผ ํด๋ณด์๋ค. 1. Clean Java Language Server Workspace 2. launch.json ์ญ์ 3. VsCode ์ข ๋ฃ ํ ์ฌ์คํํ๊ธฐ - ์์ธ๋ก ์ด ๋ถ๋ถ์์ ํด๊ฒฐ๋๋ ๋ฌธ์ ๋ค์ด ๋ง์. 4. ์ฌ๋ถํ ์ ๋ฐฉ๋ฒ์ผ๋ก๋ ์๋์ ์ฐพ๋ ์ค, ๋ค์๊ณผ ๊ฐ์ ๋ด์ฉ์ ๊ธ์ ์ฐพ์๋ค. " main class not found ์๋ฌ๋, ์ง.. java.lang.NoSuchMethodError: org.apache.log4j.Logger NoSuchMethodError : java.lang.NoSuchMethodError: org.apache.log4j.Logger - ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋น๋ ๊ฒฝ๋ก์ log4j jar ํ์ผ์ด 2๊ฐ ์ด์ ์กด์ฌ ์ ์ถฉ๋ํ๋ ๋ฌธ์ - ๋น๋ ๊ฒฝ๋ก์ ์ฌ์ฉํ๋ ๋ฒ์ ๋ง ๋จ๊ธฐ๊ณ ๋น๋ํ๋ ์ ์ ์๋ํจ. NoSuchMethodError : org.apache.commons.codec.binary.hex.encodehexstring NoSuchMethodError : org.apache.commons.codec.binary.hex.encodehexstring ์๋ฌ ํด๊ฒฐ - commons-codec ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ฌ๋ฌ ๋ฒ์ ์ด ์ถฉ๋ํด์ ๋ฐ์ํ๋ ๋ฌธ์ ์์ - ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋น๋ ๊ฒฝ๋ก์ 1๊ฐ ์ด์์ codec ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์๋์ง ํ์ธ ํ, ์ฌ์ฉํ๋ ๊ฒ๋ง ๋จ๊ธด ํ ๋ค์ ๋น๋ํ๋ ์ ์ ์๋ ํจ. [ORACLE] ์ฟผ๋ฆฌ ๋ด ์กฐ๊ฑด ๋ณ์ ๋๋ ํ๋์ฝ๋ฉ ์ฌ์ด ์๋ ์ด์ ํด๊ฒฐ ( + ojdbc7,8 download ) ๊ฒฝํํ ์๋ฌ์ ๋ํ ํด๊ฒฐ๋ฒ์ ๊ณต์ ๋๋ฆฝ๋๋ค. ๋ฌธ์ 1. ๋ณต์กํ ์ฟผ๋ฆฌ ๋ด ์กฐ๊ฑด๋ฌธ์์ MyBatis #{๋ณ์} ์ฒ๋ฆฌ๋ ๊ตฌ๋ฌธ์ด ์กด์ฌ. 2. ํด๋น ์ฟผ๋ฆฌ๊ฐ SQL Developer ์์ ์คํํ๋ฉด 10๋ถ์ด์ ์์, ํ์ง๋ง Dbeaver ์์ ์คํ ์, 1.13์ด ๊ฑธ๋ฆผ. 3. ์ด๋ ํ๋ก์ ํธ๊ฐ ๊ตฌ๋๋๋ ์๋ฒ์์๋ ๋์ผํ์์. ํด๊ฒฐ๊ณผ์ 1. ํด๋น ๋ณ์๋ฅผ ํ๋์ฝ๋ฉ์ผ๋ก ๋ฐ๊พธ์, ๋ ํด์์ ์ ๋ถ 1์ด๋ ์คํ ์๊ฐ์ด ๋์ด. 2. ๋ณ์๋ก ์คํ ์, developer ์์๋ง ๋๋ฆฌ๋ค๋๊ฑธ ์ฌํ์ธ. 3. ํ๋ก์ ํธ jdbc ๋๋ผ์ด๋ฒ ํ์ธ ๊ฒฐ๊ณผ , ojdbc6 ์ผ๋ก ํ์ธ๋จ. 4. developer jdbc ๋๋ผ์ด๋ฒ ํ์ธ ๊ฒฐ๊ณผ, ojdbc6 ์ผ๋ก ํ์ธ๋จ. 5. Dbeaver ๋ด jdbc ๋๋ผ์ด๋ฒ ํ์ธ ๊ฒฐ๊ณผ, ojdbc8 ๋ก ํ์ธ๋จ. ํด๊ฒฐ 1... npm ์ค์น ํ, start ์ ์๋ฌ ํด๊ฒฐ npm missing file 'package.json' npm missing script start ๋ฑ๊ณผ ๊ฐ์ด ๊ฒฝ๋ก๋ฅผ ๋ชป์ฐพ๋ ๋ฏํ ์๋ฌ๊ฐ ๋ฐ์ํ์๋ค. ๊ฒ์ ๊ฒฐ๊ณผ, "์ํ์ฝ๋ฉ" ๊ฐ์์์๋ npm ์ C์ ๊น๊ณ , create-react-app ํ๋ก์ ํธ ๋ํ ๋ฐํํ๋ฉด์ ์ธํ ํ๊ธฐ ๋๋ฌธ์ VS Code ์์ ํฐ๋ฏธ๋ ์ ์ ์, ๊ธฐ๋ณธ์ผ๋ก ๋ฐํํ๋ฉด์ ์ก์์ฃผ์ด์ 'npm start' ๋ช ๋ น์ด๊ฐ ๋จนํ๋ค. ํ์ง๋ง ์ ๋ช ๋ น์ด๊ฐ ์ ๋๋ก ์คํ๋๋ ค๋ฉด, create-react-app ์ ํตํด ๋ง๋ค react ํ๋ก์ ํธ์ ๊ฒฝ๋ก ๋ด์์ ํด๋น ๋ช ๋ น์ด๋ฅผ ์คํํด์ผ ์ ๋๋ก ์คํ๋๊ณ , ์๋์ผ๋ก ์ฐฝ์ด ์ด๋ฆฌ๊ฒ ๋๋ค. * npm start ์คํ์ , create-react-app ์ ํตํด ๋ง๋ ํ๋ก์ ํธ ๊ฒฝ๋ก์์ ์คํํ๋ค. ์ด์ 1 2 ๋ค์