백앤드 개발자로써2년차이고 프론트엔드 개발은 이전에 프로젝트 한번 해봤었어요 성향이 프론트엔드 개발에 흥미가 더 있고 훨씬 더 잘할 수 있을 것 같다는 생각이 들면서 주변에 물어보면 둘 다 해야한다고 하고 하나라도 포기하지 않았으면 한다고 하는데 캡틴님 생각이 궁금해서 한번 여쭈어보려고요 !
spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/oauthdb?useSSL=false username: root password: jinwook219 jpa: database: mysql # InnoDB?? database-platform: org.hibernate.dialect.MySQL8Dialect generate-ddl: true hibernate: ddl-auto: create show_sql: true jwt: # 32글자 이상 인코딩된 문자열 : oauthserversecretaccesstokenoauthserversecretaccesstokenoauthserversecretaccesstoken secret: b2F1dGhzZXJ2ZXJzZWNyZXRhY2Nlc3N0b2tlbm9hdXRoc2VydmVyc2VjcmV0YWNjZXNzdG9rZW5vYXV0aHNlcnZlcnNlY3JldGFjY2Vzc3Rva2Vu expiration: 3000 #분단위 package com.example.oauth.auth; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import javax.crypto.spec.SecretKeySpec; import java.security.Key; import java.util.Date; @Component public class JwtTokenProvider { private final String secretKey; private final int expiration; private Key SECRET_KEY; public JwtTokenProvider(@Value("${jwt.secret}") String secretKey, @Value("${jwt.expiration}") int expiration) { this.secretKey = secretKey; this.expiration = expiration; this.SECRET_KEY = new SecretKeySpec(java.util.Base64.getDecoder().decode(secretKey), SignatureAlgorithm.HS512.getJcaName()); } public String createToken(String email, String role){ // claims는 jwt토큰의 payload부분을 의미 Claims claims = Jwts.claims().setSubject(email); claims.put("role", role); Date now = new Date(); String token = Jwts.builder() .setClaims(claims) .setIssuedAt(now) .setExpiration(new Date(now.getTime()+ expiration*60*1000L)) .signWith(SECRET_KEY) .compact(); return token; } } Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-04-29T00:35:55.742+09:00 ERROR 3891 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenProvider' defined in file [/Users/macforjinwook/Desktop/oauth/build/classes/java/main/com/example/oauth/auth/JwtTokenProvider.class]: Unexpected exception during bean creation at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:536) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1155) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1121) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1056) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) ~[spring-context-6.2.5.jar:6.2.5] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.2.5.jar:6.2.5] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.4.4.jar:3.4.4] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.4.jar:3.4.4] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.4.jar:3.4.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.4.jar:3.4.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.4.4.jar:3.4.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.4.4.jar:3.4.4] at com.example.oauth.OauthApplication.main(OauthApplication.java:10) ~[main/:na] Caused by: org.springframework.util.PlaceholderResolutionException: Could not resolve placeholder 'jwt.secret' in value "${jwt.secret}" at org.springframework.util.PlaceholderResolutionException.withValue(PlaceholderResolutionException.java:81) ~[spring-core-6.2.5.jar:6.2.5] at org.springframework.util.PlaceholderParser$ParsedValue.resolve(PlaceholderParser.java:423) ~[spring-core-6.2.5.jar:6.2.5] at org.springframework.util.PlaceholderParser.replacePlaceholders(PlaceholderParser.java:128) ~[spring-core-6.2.5.jar:6.2.5] at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:118) ~[spring-core-6.2.5.jar:6.2.5] at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:114) ~[spring-core-6.2.5.jar:6.2.5] at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:255) ~[spring-core-6.2.5.jar:6.2.5] at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:226) ~[spring-core-6.2.5.jar:6.2.5] at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:201) ~[spring-context-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:971) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1577) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1555) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:240) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1381) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1218) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[spring-beans-6.2.5.jar:6.2.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.5.jar:6.2.5] ... 16 common frames omitted 종료 코드 1(으)로 완료된 프로세스 Caused by: org.springframework.util.PlaceholderResolutionException: Could not resolve placeholder 'jwt.secret' in value "${jwt.secret}" 이 부분을 보면 yml에 있는 jwt.secret을 인식 못하는 것 같은데 원인을 못 찾겠습니다 강사님 깃허브 코드를 붙혀넣어봐도 왜 이런지 잘 모르겠습니다. 혹시 이런 경우에는 어떤 것을 찾아봐야하나요??
퀘이사(Quasar) 완벽 마스터: Vue 프론트 웹을 빠르게 만들고 싶다면! (Based Vue3)
여백이 선생님 만큼 안떨어지는데 왜 그럴까요? <template> <g-page class="q-pa-xl"> <section class="q-mb-xl"> <div class="text-h4">Headings</div> <q-separator class="q-my-md" /> <p class="text-h1">Headline 1</p> <p class="text-h2">Headline 2</p> <p class="text-h3">Headline 3</p> <p class="text-h4">Headline 4</p> <p class="text-h6">Headline 5</p> <p class="text-h6">Headline 6</p> <p class="text-subtitle1">Subtitle 1</p> <p class="text-subtitle2">Subtitle 2</p> <p class="text-body1"> Body 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam. </p> <p class="text-body2"> Body 2. Lorem ipsum dolor sit amet consectetur adipisicing elit. Cupiditate aliquid ad quas sunt voluptatum officia dolorum cumque, possimus nihil molestias sapiente necessitatibus dolor saepe inventore, soluta id accusantium voluptas beatae. </p> <p class="text-caption">Caption text</p> <p class="text-overline">Overline</p> </section> <section> <div class="text-h4">FontWeight</div> <q-separator class="q-my-md" /> <p class="text-weight-thin"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-light"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-bold"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> </section> <section> <div class="text-h4">CSS Helper Classes</div> <q-separator class="q-my-md" /> <p class="text-weight-thin text-right"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-light text-center"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-bold text-strike"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> </section> </g-page> </template> <script></script> <script setup></script> <style lang="scss" scoped></style>
계속 에러만 발생하면 아에 서버가 꺼지더라구요 if (!user) { res.status(401).send('Authentication failed. User not found.'); } 위에 해당코드에 return 해주니 되더라구요 이미 401에러인데 리턴 끝내지않아서 아래도 실행이 되는게 문제였습니다. if (!user) { return res.status(401).send('Authentication failed. User not found.'); }
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 혹시 POPUP이라든지 이런 부분은 노션 교안에 없는건가요?
안녕하세요. 강의 넘넘 잘 듣고 있습니다. 이번 강의 따라하다가 이상한 부분이 있어서 질문 드립니다. 기존에 사용하던 axios 호출 방식은 이상없이 잘 작동했었는데 이번에 컴포저블로 변경하면서 동일한 결과가 나오지 않습니다. useAxios에서 응답을 로그로 찍어보면 아래와 같이 Proxy(object)라는게 달라 붙습니다. 이녀석을 해당 page에서 전달받아서 로그를 찍어보면 아래와 같이 RefImpl이라는게 달라 붙습니다. 저런것들이 달라 붙으면서 안에 data를 사용하려고 하면 undefined로 뜨고 가져오질 못하고 있습니다. 참고로 저는 별도의 api 서버를 구축하여 강의를 따라하고 있습니다. 무엇이 문제일까요? 어떻게 해결 할 수 있을까요?
이와같이 npm install -D vue-tsc typescript를 했음에도 타입체크가 안되고있는모습입니다 이유를 알수있을까요? 또한 강의교안대로 했을때 이렇게되고 npm run lint를하면 kimchanghun@gimchancBookAir learn-nuxt-3 % npm run lint > lint > eslint "**/*.{ts,tsx,vue,js}" --fix Oops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './config' is not defined by "exports" in /Users/kimchanghun/learn-nuxt-3/node_modules/eslint/package.json imported from /Users/kimchanghun/learn-nuxt-3/eslint.config.js at exportsNotFound (node:internal/modules/esm/resolve:314:10) at packageExportsResolve (node:internal/modules/esm/resolve:661:9) at packageResolve (node:internal/modules/esm/resolve:774:12) at moduleResolve (node:internal/modules/esm/resolve:854:18) at defaultResolve (node:internal/modules/esm/resolve:984:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:685:12) at #cachedDefaultResolve (node:internal/modules/esm/loader:634:25) at ModuleLoader.resolve (node:internal/modules/esm/loader:617:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:273:38) at ModuleJob._link (node:internal/modules/esm/module_job:135:49) 이런오류가뜹니다!
예전에 제가 Vue를 사용할 때 아래와 같이 작업한 경험이 있습니다. <template> <template #title>{{ title }}</template> <template #chart>...</template> </template> 위에서 template에 #을 붙이는게 어떤 의미인지 기억이 안나서 그런데 혹시 아시나요? 구글링을 해도 안나와서 부득이하게 여기에 질문 남깁니다.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 이 두개를 선택하면 선생님이 하신건 npm run lint가 뜨는데 왜 저는 npm run format? 이 뜨는걸까요..?
저는 이상하게 둘다 오류가 발생합니다. Node버전이 22여서 20으로 바꿔서 해봐도 오류가 납니다. > npx > create-vue node:internal/modules/esm/load:209 throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, schemes); ^ Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:209:11) at defaultLoad (node:internal/modules/esm/load:107:3) at ModuleLoader.load (node:internal/modules/esm/loader:701:12) at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:514:43) at #createModuleJob (node:internal/modules/esm/loader:538:36) at #getJobFromResolveResult (node:internal/modules/esm/loader:306:34) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:274:41) at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:577:25) { code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME' } Node.js v22.14.0 npm error code 1 npm error path C:\VueTemp npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c create-vue npm error A complete log of this run can be found in: C:\Users\xxxx\AppData\Local\npm-cache\_logs\2025-04-02T02_23_01_287Z-debug-0.log 어디가 문제일까요?
"인가코드(백엔드에서 발급)" 강의에서 백엔드에서 소셜 로그인을 처리 부분에 질문이 있습니다. 해당 방식의 단점이 JWT 반환 시, redirect 방식을 사용하므로 JWT 토큰 값이 노출될 수 있어 보안상 문제가 될 수 있다고 이해했습니다. 하지만 JWT 토큰 값 자체는 브라우저 로컬 스토리지에 저장하면 어떻게든 유저에게 노출되는 것 아닌가 라는 생각이 듭니다. 이에 대한 강사님의 생각이 궁금합니다.
선생님 도와주세요ㅠㅠ 어디에서 뭘 뺀 건지... 잘못 넣은 건지... 수업 영상을 다시 돌려봐도 모르겠어요ㅠㅠㅠ 경고 문구 main.js?t=1742821699924:20 [Vue warn]: Invalid prop: type check failed for prop "id". Expected String with value "1", got Number with value 1. at <PostDetailView id=1 > 이슈 문구 PostDetailView.vue:67 TypeError: relativeURL.replace is not a function at combineURLs (axios.js?v=db7c3fbd:1351:74) at buildFullPath (axios.js?v=db7c3fbd:1358:12) at resolveConfig_default (axios.js?v=db7c3fbd:1448:28) at dispatchXhrRequest (axios.js?v=db7c3fbd:1480:21) at new Promise (<anonymous>) at xhr (axios.js?v=db7c3fbd:1479:10) at Axios.dispatchRequest (axios.js?v=db7c3fbd:1954:10) at Axios._request (axios.js?v=db7c3fbd:2167:33) at Axios.request (axios.js?v=db7c3fbd:2058:25) at Axios.<computed> [as get] (axios.js?v=db7c3fbd:2186:17) at Axios.request (axios.js?v=db7c3fbd:2062:41) at async fetchPost (PostDetailView.vue:61:22) ============================== 아래 인프런 AI 답변을 기준으로 수정을 했는데, 오류가 해결한 듯 보여집니다 ! https://github.com/eunhye8767/study-vue3/commit/2c307584bbd5c0adad55887762ccac04dffc7621
ERROR Failed to compile with 2 errors 오후 11:58:26 This dependency was not found: * vue in ./node_modules/vue-router/dist/vue-router.esm-bundler.js, ./src/main.js terminal에 npm run serve를 했는데 이런 에러가 납니다.. 어떻게 해야 할까요..?