안녕하세요 강사님 강의 내에서 구성한 Nested Navigation 구조를 참고하여 무신사(musinsa)와 같은 화면 구성을 시도해 보고 있는데 navigation 구조 설계가 생각보다 어려워서 질문 드립니다. 원하는 구조는 Bottom Tab에 따라서 Topbar Screen에 해당하는 부분에 장바구니와 알림 버튼이 들어가게 하고싶은데 아래와 같은 navigation 설계로 가능한지 질문드립니다. AuthStackNavigator AuthHomeScreen KakaoLoginScreen BottomTabNavigator HomeStack TopbarScreen HomeScreen StoreStack MypageStack ❗ 질문 작성시 참고해주세요 최대한 상세히 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주셔야 그만큼 자세히 답변드릴 수 있습니다. 맥/윈도우, 안드로이드/iOS, 버전 등의 개발환경 도 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요!
public class StringImmutable2 { public static void main(String[] args) { String before = "hello"; String after = before.concat(" java"); System.out.println("before = " + before); System.out.println("after = " + after); } } 자바 프로그램 로딩 시점에 문자열 리터럴이 문자열 풀에 보관된다고 알고 있는데요. 위 코드에서 "hello" 뿐만 아니라 " java"도 문자열 리터럴인가요? 그렇다면 " java"도 문자열 풀에 저장되는 것인가요? (제가 자바 기초 지식이 부족한 상태입니다) concat() 내부에서 생성하는 String 인스턴스는 문자열풀에 생성되는 것인가요? 아니면 문자열풀이 아닌 힙 영역에 생성되는 것인가요?
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 5:50에서 공통 처리 catch를 최상위 예외인 Exception으로 잡았는데 결국 해결할 수 없는 예외들은 언체크 예외들로 구성되어 있으니깐 RuntimeException으로 잡는게 낫지 않나요? 다른 케이스가 있어서 그런건지 궁금해서 질문 남깁니다.
//JdbcTemplateMemberRepository public class JdbcTemplateMemberRepository implements MemberRepository { private final JdbcTemplate jdbcTemplate; public JdbcTemplateMemberRepository(DataSource dataSource) { jdbcTemplate = new JdbcTemplate(dataSource); //SpringConfig @Configuration public class SpringConfig { private final DataSource dataSource; public SpringConfig(DataSource dataSource) { this.dataSource = dataSource; } JdbcTemplate을 사용하도록 스프링 설정 변경하는 부분인데 이전에 객체를 생성해서 직접 주입하면 안좋다고 하셨었는데 jdbc템플릿을 적용하시는 부분에서는 직접 dataSource를 JdbcTemplate를 생성해서 넣으셨습니다. public SpringConfig(DataSource dataSource) { this.dataSource = dataSource; }대신에 JdbcTemplate를 빈에 등록해서 이렇게 사용하는게 이전에 배운내용에 따르면 의존성, 결합성 면에서 나은 코드라 생각했습니다. (@autowired를 사용하게끔 수정해본 코드) //JdbcTemplateMemberRepository public class JdbcTemplateMemberRepository implements MemberRepository { private final JdbcTemplate jdbcTemplate; @Autowired public JdbcTemplateMemberRepository(DataSource dataSource) { jdbcTemplate = new JdbcTemplate(dataSource); //SpringConfig @Configuration public class SpringConfig { private final DataSource dataSource; @Bean public JdbcTemplate jdbcTemplate(DataSource dataSource) { return new JdbcTemplate(dataSource); } } 이렇게 수정해서 사용하라고 설명해주시다가 이 JdbcTemplate강의에서는 직접 주입하시면서 설명해주셨는데, JdbcTemplate빈을 정의해서 주입하는 방식이 아닌 Datasource를 직접 사용한 이유가 있을까요? 뭔가 데이터접근할때는 다른부분이 있어서 이런 방법이 사용된건지 궁금합니다.
[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
@Post() @UseGuards(AccessTokenGuard) @UseInterceptors(TransactionInterceptor) async postPost(@User("id") userId: number, @Body() body: CreatePostDto, @QueryRunner() qr: QR) { // temp -> posts로 옮긴다음에 포스팅 const post = await this.postsService.createPost(userId, body, qr); // throw new InternalServerErrorException("에러가 생겼습니다."); // 포스트만 생성하고, 이미지는 생성안해버림 throw 에러에서 걸림. 원래는 포스트 게시글이 생기면 안됨. for (let i = 0; i < body.images.length; i++) { await this.PostsImagesService.createPostImage( { post, order: i, path: body.images[i], type: ImageModelType.POST_IMAGE, }, qr, ); } // Transaction 타입에 따라서 Transaction이 커밋 되기전에 최신 값을 가져오지 못할 수 있다. (service에서 해당 문제 처리 직접 qr받아서) // 가장 최근상태의 포스트를 받아와서, 반환해줌. return this.postsService.getPostById(post.id, qr); Transaction 타입에 따라서 Transaction이 커밋 되기 전에 최신 값을 가져오지 못할 수 있다고 하셔서, getPostById service에서 직접적으로 qr을 주입받아서, 사용했는데 정확히 어떤 이유로 최신 값을 못받아오는지 잘 이해가 안가서, 자세히 설명을 해주실 수 있나요?
맥북 m1으로 똑같이 설정을 했습니다. 그리고 npx react-native init MatzipApp으로 프로젝트를 실행하면 아래오 같은 메시지가 나옵니다. Downloading template ✔ Copying template ⠸ Processing template➤ YN0000: Retrieving https://repo.yarnpkg.com/3.6.4/packages/yarnpkg-cli/bin/yarn.js ⠙ Processing template➤ YN0000: Saving the new release in ../../../.yarn/releases/yarn-3.6.4.cjs ➤ YN0000: Done in 0s 666ms ⠼ Processing template➤ YN0000: Successfully set nodeLinker to 'node-modules' ✔ Processing template ⠸ Installing dependencieserror Installing pods failed. This doesn't affect project initialization and you can safely proceed. However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section. ✖ Installing dependencies info 💡 To enable automatic CocoaPods installation when building for iOS you can create react-native.config.js with automaticPodsInstallation field. For more details, see https://github.com/react-native-community/cli/blob/main/docs/projects.md#projectiosautomaticpodsinstallation ✔ Initializing Git repository Run instructions for Android: • Have an Android emulator running (quickest way to get started), or a device connected. • cd "/Users/xxx/React-Project/React-Native/MatzipApp" && npx react-native run-android Run instructions for iOS: • cd "/Users/sss/React-Project/React-Native/MatzipApp/ios" • Install Cocoapods • bundle install # you need to run this only once in your project. • bundle exec pod install • cd .. • npx react-native run-ios - or - • Open MatzipApp/ios/MatzipAppcd .xcodeproj in Xcode or run "xed -b ios" • Hit the Run button Run instructions for macOS: • See https://aka.ms/ReactNativeGuideMacOS for the latest up-to-date instructions. 이런 메시지가 뜨고 npm run start로 실행을 하면 command not found메시지가 뜨면서 애뮬레이터도 실행이 안됩니다.ㅠㅠ
안녕하세요. 하단 탭 메뉴 중 즐겨찾기 탭으로 이동하여 FeedItem 선택 후 FeedDetail 화면으로 이동한 후 뒤로 가기를 누르면 즐겨찾기 탭 으로 가는게 아니라 FeedHome 탭으로 이동합니다. 즐겨찾기탭으로 돌아가게 하려면 어떻게 해야 될까요. ❗ 질문 작성시 참고해주세요 최대한 상세히 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주셔야 그만큼 자세히 답변드릴 수 있습니다. 맥/윈도우, 안드로이드/iOS, 버전 등의 개발환경 도 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요!
안녕하세요 친절한 강의에 정말 감사드립니다^^ ios앱 심사 정보 작성에 여쭤볼게 있는데요. 심사 과정에 통과하려면 backend 배포가 된 상태여야 심사가 가능하니, backend 배포가 선행돼야 하는건가요? 앱에 로그인할 수 있도록 사용자 이름 및 암호를 입력하십시오. 앱 심사를 완료하려면 로그인 정보가 필요합니다.
안녕하세요 강사님 2:05 진행 과정에서 저는 java가 아닌 Kotlin으로 되어있어서요 ChatGPT로 변경하는 요청을 했는데 아래와 같이 안내하고 있습니다 혹시 이대로 진행하면 될까요? override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(null) }
안녕하세요, 궁금한 내용이 생겨 기존에 질문들을 살펴보고 제가 이해한 것이 맞는지 확인차 질문드립니다. redis의 싱글스레드 특성으로 100개 발급에 대한 race condition 해결 --> 그러나 insert 시 DB 처리량에 부하가 발생할 수 있음 kafka 미들웨어를 통해 100개의 쿠폰 저장 이벤트를 보관해두었다가 컨슈머에서 원할때 꺼내어 처리할 수 있는 여지를 주어 처리량 부하를 분산시킬 수 있음 ex) 쿠폰 발급은 당장 안해도 되니, kafka에 이벤트만 잘 발행되어 있다면 DB 작업량이 적은 새벽에 꺼내서 저장해도 됨 이렇게 이해했는데, 맞을까요?
[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
// POST auth/login/email @Post('login/email') @UseGuards(BasicTokenGuard) // authorization 기준으로 rawToken을 받아옴. postLoginEmail(@Headers('authorization') rawToken: string, @Request() req) { // email:password -> base64 // adsfasdfasfdad => email:password const token = this.authService.extractTokenFromHeader(rawToken, false); const credentials = this.authService.decodeBasicToken(token); return this.authService.loginWithEmail({ email: credentials.email, password: credentials.password, }); } 질문이 있습니다. req.user.email , req.user.password 이런식으로 Guard를 통해 요청에 대한 값을 받아올 수 있다고 설명해주셨습니다. 실제로 guard 부분에서, 해당 extractTokenFromHeader부분과, decodeBasicToken 부분이 겹치는 것 같은데, 이중적으로 처리해주는 것이 맞는지 아니면 아래와 같이 req.user.password 부분을 디코드 해주어서, 중복 부분을 생략해 줄 수 있을 것이라고 생각하는데 어떤 접근방법이 맞는지 궁금합니다! 이 부분도 중복을 해결해야 하는 부분 아닌가 해서 궁금합니다! // POST auth/login/email @Post('login/email') @UseGuards(BasicTokenGuard) // authorization 기준으로 rawToken을 받아옴. postLoginEmail(@Headers('authorization') rawToken: string, @Request() req) { // 여기는 req.user.password를 직접 입력하게되면 인코드된 값이므로, 디코드 된 값이 들어가야 할 것 같긴합니다. (JWT 모듈같은 것을 활용해서!) return this.authService.loginWithEmail({ email: req.user.email, password: req.user.password, }); }
상황: 1-5 강의 듣는중이고, ruby 2.7.6 까지 세팅 하였습니다. (과정에 조금 문제가 있었지만 성공); npx ~ --version 0.72.6 에러 없이 성공 그 후 npm run ios >> 시뮬레이터 뜸 >> 앱 실행 안됨 에러 내용이 너무 많아 처음과 끝만 올렸어요ㅠ info Found Xcode workspace "MatdoriApp.xcworkspace" info Found booted iPhone SE (3rd generation) info Launching iPhone SE (3rd generation) info Building (using "xcodebuild -workspace MatdoriApp.xcworkspace -configuration Debug -scheme MatdoriApp -destination id=CBBF6748-CE87-48B0-B69A-") info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor . . . error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening MatdoriApp.xcworkspace. Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace MatdoriApp.xcworkspace -configuration Debug -scheme MatdoriApp -destination id=CBBF6748-CE87-48B0-B69A-14A62A514208 User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES Prepare packages warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MatdoriApp' from project 'MatdoriApp') warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MatdoriApp' from project 'MatdoriApp') --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:CBBF6748-CE87-48B0-B69A-, OS:17.4, name:iPhone SE (3rd generation) } { platform:iOS Simulator, id:CBBF6748-CE87-48B0-B69A-, OS:17.4, name:iPhone SE (3rd generation) } ** BUILD FAILED ** The following build commands failed: CompileC /Users/ajrfyd/Library/Developer/Xcode/DerivedData/MatdoriApp-dzlyrdyzrnadjbcljrudendrtkwk/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/arm64/FlipperPlatformWebSocket.o /Users/ajrfyd/Desktop/practice/inflearn/MatdoriApp/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'FlipperKit' from project 'Pods') (1 failure) 환경: OS: macOS 14.4.1 CPU: (8) arm64 Apple M1 Node: 18.16.0 Yarn: 1.22.22 npm: 9.5.1 Watchman: 2024.04.15.00 CocoaPods: 1.15.2 iOS SDK: Platforms: - DriverKit 23.4 - iOS 17.4 - macOS 14.4 - tvOS 17.4 Android SDK: Not Found // 이건 왜 그런지 몰겠음... 강의 따라 설치 되어 있는데..ㅠ Android Studio: 2022.1 AI-221.6008.13.2211.9619390 Xcode: 15.3/15E204a Java: 17.0.11 Ruby: 2.7.6 npmPackages: "@react-native-community/cli": Not Found react: 18.2.0 react-native: 0.72.6 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false 에러 내용으로 아무리 검색 해 봐도 답이 없네요ㅠ 도와 주실 수 있을까요?? 참고로 예전에 리엑트 네이티브, 엑스포 프로젝트 좀 했었고, 이번에 한번 다시 듣고파 결제 했습니다 . xcode 버전 지원안된다 하여 최신으로 깔고, watchman python에러 잡아서 다시 깔고, 루비 이슈 해결하고, 안드로이드 스튜디오는 딱히 다시 깔지 않아도 될것 같아 놔두고 설명해 주신 이미지 13이랑 32?? 등등 깔고, 공식문서에서 이미 깔린 react-native/cli는 지우는걸 추천해서 지우고 이정도 입니다 ..