MappingClassController에서 구현한 GetMapping은 /mapping/users + GET으로 호출합니다. @GetMapping("/mapping/users") public String user() { return "get users"; } 이 때, 앞서 구현한 MappingController에서 구현한 @GetMapping("/mapping/{userId}") public String mappingPath(@PathVariable("userId") String data) { log.info("mappingPath userId={}", data); return "ok"; } 위 코드는 /mapping/{userId} + GET으로 호출합니다. 위 상황에서, /mapping/users를 GET으로 조회할 경우 MappingClassController가 호출됩니다. 제가 궁금한 것은, 두 컨트롤러 사이에 우선순위가 존재하나요? 그렇지 않다면 Spring은 같은 문자열인 users가 {userId}가 아닌 것을 어떻게 구별하나요?
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? ( 예 /아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? ( 예 /아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? ( 예 /아니오) [질문 내용] 안녕하세요. public void run() { while (!Thread.interrupted()) { if (jobQueue.isEmpty()) { Thread.yield(); continue; } ... } 위에 코드에서 Yield 를 사용하면 그 쓰레드가 양보를 해서 다시 스케쥴러로 들어간다고 하셨는데, 그러면 Thread.yield(); 가 실행이 된 후에, 다시 CPU 가 이 쓰레드를 실행시키기 전까지 그 다음 줄의 continue 코드는 실행되지 않고 멈춰있는 상태라고 생각하면 될까요? 그렇다면 쓰레드는 CPU 가 다시 실행시킬 시점에 몇번째 라인까지 실행을 했는지 기억하고 있다가 CPU 에게 알려주는 건가요? 감사합니다.
안녕하세요, React Navigation 강의를 수강하다가 오류가 해결되지 않아서 질문드립니다. expo를 통해 다음과 같이 index.js에 React Navigation을 적용했습니다. import { store } from "@/redux/store"; import MainScreen from "./screens/MainScreen"; import { Provider } from "react-redux"; import { NavigationContainer } from "@react-navigation/native"; import { createNativeStackNavigator } from "@react-navigation/native-stack"; import LoginScreen from "./screens/LoginScreen"; export default function HomeScreen() { const Stack = createNativeStackNavigator(); return ( <Provider store={store}> <NavigationContainer> <Stack.Navigator> <Stack.Screen name="Main" component={MainScreen} /> <Stack.Screen name="Login" component={LoginScreen} />{" "} </Stack.Navigator> </NavigationContainer> </Provider> ); } 그러나 다음과 같은 오류가 뜨며 빈화면만 보이더라구요ㅠ Error: Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them. 찾아보니 NavigationContainer가 중첩되었다는 것 같은데, 저는 계속해서 그대로 강의를 따라가고 있었고, 따로 NavigationContainer를 적용한 파일이 존재하지 않습니다 ㅠ 다음 속성을 추가해도 오류가 해결되지 않습니다 ㅠ 아마 어디선가 부모에서 NavigationContainer가 적용된 것 같은데 찾을 수가 없네요 ㅠㅠ independent={true} 조금 더 찾아보니 expo-router랑 충돌이 난 거일 수도 있다는데 정확하게 모르겠네요 ㅠㅠ
1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] DataSourceUtils.getConnection(dataSource) 를 사용하면 트랜잭션 동기화 매니저가 관리하는 커넥션이 없는 경우 새로운 커넥션을 생성해서 반환한다 라고 되어 있습니다. 이때 dataSource의 구현체가 커넥션 풀링을 사용하는 구현체 (예를 들면 실습했던 HikariDataSource) 라면 미리 커넥션을 생성해둔 후 커넥션 풀에 보관해두고, 사용 시에 조회해 오는 것으로 알고있었습니다. 그렇다면 이 때 위의 굵은 글씨 내용 중 새로운 커넥션을 생성한다는 것은 커넥션 풀에서 새로운 커넥션을 조회해오는 것 인가요 아니면 아예 새로운 커넥션을 생성하는 것 인가요?
========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 여기에 질문 내용을 남겨주세요. 안녕하세요, 현재 request scope 부분 강의를 들으면서 HTTP request 부분을 provider로 대체하면 실행이 된다고 하셔서 시도했는데 아래와 같은 메시지가 뜨면서 CoreApplication이 무한로딩이 걸립니다. 스프링 3.0이상의 버전을 써서 이렇게 나는걸까요? Negative matches 가 뜨면서 무한 로딩이 걸림 Negative matches: ----------------- ActiveMQAutoConfiguration: Did not match: - @ConditionalOnClass did not find required class 'jakarta.jms.ConnectionFactory' (OnClassCondition) AopAutoConfiguration.AspectJAutoProxyingConfiguration: Did not match: - @ConditionalOnClass did not find required class 'org.aspectj.weaver.Advice' (OnClassCondition) 22:52:01.283 [main] INFO hello.core.CoreApplication -- Started CoreApplication in 1.236 seconds (process running for 1.548) 22:52:01.284 [main] DEBUG o.s.b.a.ApplicationAvailabilityBean -- Application availability state LivenessState changed to CORRECT 22:52:01.285 [main] DEBUG o.s.b.a.ApplicationAvailabilityBean -- Application availability state ReadinessState changed to ACCEPTING_TRAFFIC
tl.set('#emart .pick', { opacity: 0 }) .to(map, { scale: 1, x: 0, y: 0 }) .set('#emart .pick', { opacity: 1 }) .fromTo('#emart .path', { strokeDashoffset: 496 }, { strokeDashoffset: 0 }) .to( '#emart .pick', { motionPath: { path: '#emart .path', align: '#emart .path', alignOrigin: [0.5, 0.5], }, }, '<' ); 위 코드에서 맨 처음 set 으로 opacity: 0 을 줘서 pick을 안 보이게 한 다음에 후에 다시 set으로 opacity: 1을 주게 되는데요 궁금한 것이 아직 순서상 motionPath 가 실행될 차례가 아니어서 마트 위치에서 pick 이 보여질 것인데 어째서 강남역 위치에서 부터 보여 지게 되는지 궁금합니다. 아래에 있는 set을 위로 올려서 tl.set('#emart .pick', { opacity: 0 }) .set('#emart .pick', { opacity: 1 }) .to(map, { scale: 1, x: 0, y: 0 }) 이렇게 위치를 바꾸면 그때서야 제가 이해한 형태로 움직이게 되네요. 왜 그런지 궁금합니다.