묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
@ResponseBody 사용 시 html 파일로 리턴됨
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]컨트롤러에서 아래와 같이 작성해서@ResponseBody @GetMapping("hello-string") public String helloString(@RequestParam("name") String name){ return "helloooooooooo " + name; }http://localhost:8080/hello-string?name=spring를 호출하면.. 개발자도구를 열었을때 단순 string 이 아니라 text/html 을 반환하는데 왜그런건가요?브라우져는 크롬 사용하고있습니다.크롬 개발자도구에서 아래와 같이 보입니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
401 오류
쿠키 세션과 전체 로그인 흐름 강의 까지 들었습니다. 안녕하세요. 로그인시 401 오류가 생겨서 해결을 못하고 있습니다. user saga 에서 logInAPI랑 logIn 부분에서 error가 생기고 있는거 같은데 이유를 찾지 못했습니다.아래에 비슷한 질문이 있길래 봤더니 json 형식으로 axios.post 해줘야 한다고 하시는 거 같은데 이해를 못하겠습니다... 조금 더 길게 설명해 주실 수 있을까요?
-
해결됨배달앱 클론코딩 [with React Native]
백 서버 터미널 오류
const token = await EncryptedStorage.getItem('refreshToken'); if (!token) { SplashScreen.hide(); // here return; } ... } finally { SplashScreen.hide(); // here } }; getTokenAndRefresh(); }, [dispatch]);강의 따라서 SplashScreen.hide() 잘 해주었는데,이 상태에서 멈추고 갑자기 back 서버 터미널이 무한 로딩되는데... back 서버를 껐다가 다시 켰는데 로그인이 되어있으면 안되는데 되어있는 상황입니다import * as React from 'react'; import {useEffect} from 'react'; import {useSelector} from 'react-redux'; import {NavigationContainer} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import Settings from './src/pages/Settings'; import Orders from './src/pages/Orders'; import Delivery from './src/pages/Delivery'; import SignIn from './src/pages/SignIn'; import SignUp from './src/pages/SignUp'; import {RootState} from './src/store/reducer'; import useSocket from './src/hooks/useSocket'; import EncryptedStorage from 'react-native-encrypted-storage'; import axios, {Axios, AxiosError} from 'axios'; import Config from 'react-native-config'; import userSlice from './src/slices/user'; import {useAppDispatch} from './src/store'; import {Alert} from 'react-native'; import orderSlice from './src/slices/order'; import usePermissions from './src/hooks/usePermissions'; import SplashScreen from 'react-native-splash-screen'; import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; import FontAwesome from 'react-native-vector-icons/FontAwesome'; export type LoggedInParamList = { Orders: undefined; Settings: undefined; Delivery: undefined; Complete: {orderId: string}; }; export type RootStackParamList = { SignIn: undefined; SignUp: undefined; }; const Tab = createBottomTabNavigator(); const Stack = createNativeStackNavigator<RootStackParamList>(); function AppInner() { const dispatch = useAppDispatch(); const isLoggedIn = useSelector((state: RootState) => !!state.user.email); const [socket, disconnect] = useSocket(); usePermissions(); useEffect(() => { axios.interceptors.response.use( response => { // console.log(response); return response; }, async error => { const { config, response: {status}, } = error; if (status === 419) { if (error.response.data.code === 'expired') { const originalRequest = config; const refreshToken = await EncryptedStorage.getItem('refreshToken'); // token refresh 요청 const {data} = await axios.post( `${Config.API_URL}/refreshToken`, // token refresh api {}, {headers: {authorization: `Bearer ${refreshToken}`}}, ); // 새로운 토큰 저장 dispatch(userSlice.actions.setAccessToken(data.data.accessToken)); originalRequest.headers.authorization = `Bearer ${data.data.accessToken}`; // 419로 요청 실패했던 요청 새로운 토큰으로 재요청 return axios(originalRequest); } } return Promise.reject(error); }, ); }, [dispatch]); useEffect(() => { const callback = (data: any) => { console.log(data); dispatch(orderSlice.actions.addOrder(data)); }; if (socket && isLoggedIn) { socket.emit('acceptOrder', 'hello'); socket.on('order', callback); } return () => { if (socket) { socket.off('order', callback); } }; }, [dispatch, isLoggedIn, socket]); useEffect(() => { if (!isLoggedIn) { console.log('!isLoggedIn', !isLoggedIn); disconnect(); } }, [isLoggedIn, disconnect]); // 앱 실행 시, 토큰 있으면 로그인하는 코드 useEffect(() => { const getTokenAndRefresh = async () => { try { const token = await EncryptedStorage.getItem('refreshToken'); if (!token) { SplashScreen.hide(); return; } const response = await axios.post( `${Config.API_URL}/refreshToken`, {}, { headers: { authorization: `Bearer ${token}`, }, }, ); dispatch( userSlice.actions.setUser({ name: response.data.data.name, email: response.data.data.email, accessToken: response.data.data.accessToken, }), ); } catch (error) { console.error(error); if (((error as AxiosError).response?.data as any).code === 'expired') { Alert.alert('알림', '다시 로그인 해주세요.'); } } finally { // TODO: 스플래시 스크린 없애기 SplashScreen.hide(); } }; getTokenAndRefresh(); }, [dispatch]); return ( <NavigationContainer> {isLoggedIn ? ( <Tab.Navigator> <Tab.Screen name="Orders" component={Orders} options={{ title: '오더 목록', tabBarIcon: () => <FontAwesome5 name="list" size={20} />, }} /> <Tab.Screen name="Delivery" component={Delivery} options={{ headerShown: false, title: '지도', tabBarIcon: () => <FontAwesome5 name="map" size={20} />, // headerTitleStyle: {fontWeight: 'bold'}, // tabBarLabelStyle: {fontSize: 12}, }} /> <Tab.Screen name="Settings" component={Settings} options={{ title: '내 정보', tabBarIcon: () => <FontAwesome name="gear" size={20} />, unmountOnBlur: true, }} /> </Tab.Navigator> ) : ( <Stack.Navigator> <Stack.Screen name="SignIn" component={SignIn} options={{title: '로그인'}} /> <Stack.Screen name="SignUp" component={SignUp} options={{title: '회원가입'}} /> </Stack.Navigator> )} </NavigationContainer> ); } export default AppInner; 아래는 백 서버 터미널 입니다 (이 부분이 계속 로딩됩니다)C:\Users\user\fooddeliveryapp\back>npm start > food-delivery-server@1.0.0 start > node app.js 연결되었습니다. TokenExpiredError: jwt expired at C:\Users\user\fooddeliveryapp\back\node_modules\jsonwebtoken\verify.js:152:21 at getSecret (C:\Users\user\fooddeliveryapp\back\node_modules\jsonwebtoken\verify.js:90:14) at module.exports [as verify] (C:\Users\user\fooddeliveryapp\back\node_modules\jsonwebtoken\verify.js:94:10) at verifyRefreshToken (C:\Users\user\fooddeliveryapp\back\app.js:59:22) at Layer.handle [as handle_request] (C:\Users\user\fooddeliveryapp\back\node_modules\express\lib\router\layer.js:95:5) at next (C:\Users\user\fooddeliveryapp\back\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\Users\user\fooddeliveryapp\back\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\Users\user\fooddeliveryapp\back\node_modules\express\lib\router\layer.js:95:5) at C:\Users\user\fooddeliveryapp\back\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\Users\user\fooddeliveryapp\back\node_modules\express\lib\router\index.js:341:12) { expiredAt: 2023-03-14T08:00:16.000Z } POST /refreshToken 419 91.985 ms - 70잘 되다가 갑자기 이러니 당황스럽네요...ㅎㅎ메트로 서버에서는 이렇게 나오네요 LOG Running "FoodDeliveryApp" with {"rootTag":11} LOG !isLoggedIn true LOG check location granted백 서버를 껐다가 켠건데 왜 로그인이 되어있는 상태로 나올까요?
-
미해결자바스크립트로 알아보는 함수형 프로그래밍 (ES5)
ES5 강의를 듣고 ES6 강의를 듣는게 좋을까요?
안녕하세요 선생님!강의가 너무 좋아서 자바스크립트 프로그래밍 ES6 강의도 수강했는데요. ES5 듣는데 너무 어렵네요 ㅜㅜ 이거 이해 갈때까지 반복 학습하고 있는데 ES5을 완강 후 ES6로 넘어가는게 좋을지 질문 드립니다
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
강의 열심히 수강 하고 잘 듣고 있습니다. 잠시 응용한번 해봤는데요
잠시 응용해봤는데요class ImdaeSaActivity : AppCompatActivity() { private val TAG = ImdaeSaActivity::class.java.simpleName private lateinit var auth: FirebaseAuth private val data = arrayListOf<ImdaeTodo>() private lateinit var binding: ActivityImdaeSaBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // setContentView(R.layout.activity_imdae_sa) binding = DataBindingUtil.setContentView(this, R.layout.activity_imdae_sa) auth = Firebase.auth auth = FirebaseAuth.getInstance() binding = ActivityImdaeSaBinding.inflate(layoutInflater) val view = binding.root setContentView(view) binding.imadaeBtn.setOnClickListener { val sename = binding.sename.text.toString() val sephone = binding.sephoneno.text.toString() val address = binding.etAddress.text.toString() val address1 = binding.etAddress1.text.toString() val kwanry = binding.kwanry.text.toString() val bojung = binding.bojung.text.toString() val worldse = binding.worldse.text.toString() val mjbb = binding.myungjuk.text.toString() val cgbb = binding.chunggo.text.toString() val uid = FBAuth.getUid() val time = FBAuth.getTime() Log.d(TAG, sename) Log.d(TAG, sephone) FBRef.Imdae .push() .setValue( ImdaeitemModel( sename, sephone, address, address1, kwanry, bojung, worldse, mjbb, cgbb, uid, time ) ) } } }한번볼께요<layout> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".List.ImdaeSaActivity"> <LinearLayout android:id="@+id/linearLayout3" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#FFE3E3E3" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" android:gravity="center|center_horizontal" android:background="@drawable/mocer_call_yello_title" android:orientation="horizontal"> <TextView android:id="@+id/imdaetitle" android:layout_width="wrap_content" android:layout_height="50dp" android:gravity="center" android:text="임대등록 하세요" android:textSize="20sp" android:textStyle="bold" /> <EditText android:id="@+id/imdaeData" android:layout_width="48dp" android:layout_height="wrap_content" android:gravity="center" android:text="날자" android:textSize="20sp"/> </LinearLayout> <androidx.core.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback" android:orientation="horizontal"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="물전종류" android:textSize="15sp"/> </LinearLayout> <TextView android:id="@+id/mulgunall" android:layout_width="match_parent" android:layout_height="40dp" android:layout_gravity="center_vertical" android:background="@drawable/mocer_call_no" android:gravity="center_horizontal|center_vertical" android:hint="물건종류를 선택하세요" android:textSize="20sp" android:textStyle="italic" tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/mocer_call" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="연락정보" android:textSize="15sp" android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/sename" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1.7" android:background="@drawable/mocer_call_mulback1" android:hint="이름" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:textSize="20sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <EditText android:id="@+id/sephoneno" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="세입자폰번호" android:inputType="phone" android:maxLength="13" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:textSize="20sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="center|left" android:text="주 소" android:textSize="15sp" android:textStyle="bold" /> <EditText android:id="@+id/etAddress" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback1" android:hint="주소입력하세요" android:inputType="textMultiLine" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <EditText android:id="@+id/etAddress1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback1" android:hint="상세주소 입력하세요" android:inputType="textMultiLine" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:layout_width="80dp" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="상세내용" android:textSize="15sp" android:textStyle="bold" /> <TextView android:layout_width="80dp" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="(단위|만원)" android:textColor="#985B01" android:textSize="13sp" android:textStyle="bold" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/kwanry" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="관리비" android:inputType="number" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> <EditText android:id="@+id/bojung" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="보증금" android:inputType="number" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> <EditText android:id="@+id/worldse" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="월세" android:inputType="number" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:orientation="vertical"> <TextView android:layout_width="60dp" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="면 적" android:textSize="15sp" android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/myungjuk" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:gravity="right|center" android:hint="면적" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:text="㎡" android:textSize="10sp" /> <LinearLayout android:layout_width="2dp" android:layout_height="20dp" android:layout_marginLeft="3dp" android:layout_marginTop="5dp" android:layout_marginRight="3dp" android:layout_marginBottom="5dp" android:background="@color/black" /> <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:gravity="right|center" android:hint="평수" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:text="평" android:textSize="10sp" /> <LinearLayout android:layout_width="2dp" android:layout_height="20dp" android:layout_marginLeft="3dp" android:layout_marginTop="5dp" android:layout_marginRight="3dp" android:layout_marginBottom="5dp" android:background="@color/black" /> <EditText android:id="@+id/chunggo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:gravity="right|center" android:hint="층고" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:gravity="left" android:text="m" android:textSize="10sp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:orientation="horizontal"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="방/욕실수" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="총층수" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <com.google.android.material.card.MaterialCardView android:id="@+id/layout01" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" android:layout_marginTop="5dp" android:outlineProvider="none" app:cardBackgroundColor="@color/white"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:text="옵 션" android:textSize="22sp" android:textStyle="bold" /> </com.google.android.material.card.MaterialCardView> <com.google.android.material.card.MaterialCardView android:id="@+id/layoutDetail01" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_marginHorizontal="10dp" android:backgroundTint="#ffffff" android:visibility="visible" app:cardCornerRadius="15dp" app:strokeColor="#aaa" app:strokeWidth="1dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="center" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <EditText android:id="@+id/option" android:layout_width="200dp" android:layout_height="40dp" android:background="@drawable/mocer_call_mulback1" android:gravity="center" android:hint="옵션등록10자까지만" android:textSize="15sp" tools:ignore="TouchTargetSizeCheck" /> </LinearLayout> <Button android:id="@+id/add_button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="추 가" /> </LinearLayout> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="5dp" android:layout_marginLeft="5dp" /> </LinearLayout> </com.google.android.material.card.MaterialCardView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <com.google.android.material.card.MaterialCardView android:id="@+id/layout02" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" android:layout_marginTop="5dp" android:outlineProvider="none"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:text="메 모" android:textSize="22sp" android:textStyle="bold" /> <ImageButton android:id="@+id/layoutBtn02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_margin="10dp" android:background="@android:color/transparent" android:clickable="false" android:src="@drawable/arrow_up" android:textSize="22sp" tools:ignore="SpeakableTextPresentCheck" /> </com.google.android.material.card.MaterialCardView> <com.google.android.material.card.MaterialCardView android:id="@+id/layoutDetail02" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_marginHorizontal="10dp" android:backgroundTint="#ffffff" android:visibility="visible" app:cardCornerRadius="15dp" app:strokeColor="#aaa" app:strokeWidth="1dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:gravity="center_horizontal" android:orientation="vertical"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback2" android:hint="필요한 내용 있으시면 여기에 메모해 주시면 됩니다. 내용은 길게 쓰셔도 되요" /> </LinearLayout> </com.google.android.material.card.MaterialCardView> </LinearLayout> </LinearLayout> </LinearLayout> </androidx.core.widget.NestedScrollView> </LinearLayout> <Button android:id="@+id/imadaeBtn" android:layout_width="60dp" android:layout_height="60dp" android:layout_marginLeft="15dp" android:layout_marginRight="15dp" android:layout_marginBottom="15dp" android:text="입 력" android:textSize="20sp" android:background="@drawable/mocer_call_yello_button" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> </layout>근데 파이어베이스에 들어가보면 uid값은 null로 나오고 가져오질 못하더라구요 그리고 보안 규칙을 { "rules": { ".read": "auth.uid !== null", ".write": "auth.uid !== null" } }로 하고 로그인을 한 다음 하면 파이어베이스에 게시글이 안들어 가지고 보안규칙을{ "rules": { ".read": "true", ".write": "true" }}해야 지만 게시글이 들어 가지더라구요참 왜 그러는지 잘 모루겠습니다.한번 살펴 봐 주시면 정말 감사하겠습니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
회원가입 페이지 기능생성 질문입니다
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. docker compose up 을 작성했는데이런식으로 나와서 연결이 된건지 안된건지 모르겠습니다.오류문구가 뜨지는 않지만 회원가입 눌렀을때 백엔드 문구가 뜨지 않아서 연결이 안된거 같아 문의드려봅니다.혹시 어느 부분이 잘못된건지 알수 있을까요?[+] Running 1/0⠿ Container postgres Running 0.0sAttaching to postgres
-
미해결스프링 시큐리티 OAuth2
고도의 신뢰성을 가지고있는 클라이언트
안녕하세요 클라이언트가 고도의 신뢰성을 가지고있는가? 에 대해 No인경우 Authorization Code 방식을, Yes인경우에는 Resource Owner 방식을 선택한다는 내용이있었는데 여기서 말하는 고도의 신뢰성을 가진 클라이언트는 구글,네이버,페이스북 이런 곳들이 해당되는걸까요?흔히 생각했을때 인프런 로그인을할때 구글로 로그인하는경우에는 Authorization code 방식이지만, 구글자체에 로그인한다고하면 Resource Owner 방식으로 하고있는건가? 라는 생각이 들어서요
-
미해결[자동화 완전 정복] 인스타그램 휴대폰, 웹 자동화 프로그램 개발
MVWAER 질문 있습니다
안녕하세요 MVwaer를 사용는 처음이라 막히는 부분이 있어 질문남깁니다.MVware 실행후 윈도우ISO까지 설치까지 완료 해야하나요??그리고 모든 교육은 MVwaer (가상컴퓨터)에서 하신거죠??? 파이썬 라이브러리도 가상컴퓨터 안에 설치하신거구요??
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
select 조회
item1을 조회할 때, 왜 select문이 출력이 안될까요ㅜㅜ
-
미해결카프카 완벽 가이드 - 커넥트(Connect) 편
mongodb sink connect 사용 중 update, delete 문제
안녕하세요.선생님 강의를 듣고 kafka connect 매커니즘에 대해 상세하게 알게 됐습니다.다만, 실무에 적용을 하는 도중 문제에 봉착해 도움을 구하고자 문의드립니다.현재 debezium mysql connector를 사용하여 source 데이터는 topic으로 저장하는데 성공하였지만,해당 데이터를 mongodb 에 저장하는데 저장/업데이트는 정상적으로 되지만 delete 시 반영이 안되는 문제가 있습니다.RDB와는 다르게 mongodb sink connector는 insert.mode는 지원하지 않고write model Strategy 를 활용하는 걸로 보이는데,아래와 같이 sink connector를 설정할 경우 account_id 를 key 로 해서 업데이트는 가능한데, 삭제는 안되네요? "connector.class": "com.mongodb.kafka.connect.MongoSinkConnector", "document.id.strategy":"com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy", "document.id.strategy.partial.value.projection.list":"account_id", "document.id.strategy.partial.value.projection.type":"AllowList", "writemodel.strategy":"com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneBusinessKeyStrategy",혹시 Source 에서 입력, 업데이트, 삭제를 mongodb에 반영하려면 어떻게 해야 되는지 알 수 있을까요?감사합니다.
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
xilinx 설치
현재 툴설치하는 단계인데 꼭 우분투환경에 설치해야하는 이유가 있나요?window버전으로 사용하면 안되는지 궁금합니다!
-
미해결설계독학맛비's 실전 AI HW 설계를 위한 바이블, CNN 연산 완전정복 (Verilog HDL + FPGA 를 이용한 가속기 실습)
안녕하십니까 cnn_acc_ci.v 파일에서 궁금한 점이 있습니다.
안녕하십니까 cnn_acc_ci.v 파일에서 약 90번 째 줄에 ot_ci_acc에 각 kernel의 값을 더해주고 w_ot_ci_acc에 wire로 연결하고 r_ot_ci_acc로 전달합니다. 여기서 w_ot_ci_acc를 통해서 r_ot_ci_acc로 전달하는 이유가 궁금합니다. =================현업자인지라 업무때문에 답변이 늦을 수 있습니다. (길어도 만 3일 안에는 꼭 답변드리려고 노력중입니다 ㅠㅠ)강의에서 다룬 내용들의 질문들을 부탁드립니다!! (설치과정, 강의내용을 듣고 이해가 안되었던 부분들, 강의의 오류 등등)이런 질문은 부담스러워요.. (답변거부해도 양해 부탁드려요)개인 과제, 강의에서 다루지 않은 내용들의 궁금증 해소, 영상과 다른 접근방법 후 디버깅 요청, 고민 상담 등..글쓰기 에티튜드를 지켜주세요 (저 포함, 다른 수강생 분들이 함께보는 공간입니다.)서로 예의를 지키며 존중하는 문화를 만들어가요.질문글을 보고 내용을 이해할 수 있도록 남겨주시면 답변에 큰 도움이 될 것 같아요. (상세히 작성하면 더 좋아요! )먼저 유사한 질문이 있었는지 검색해보세요.잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.==================
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
webapp에서 jsp 오류
webapp안에 jsp를 넣고 웰컴 페이지를 뜨게 하려고 하였으나 404오류가 떠서 진도를 못내고 있습니다. 도와주시면 감사하겠습니다!
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
몽고디비 접속 문제
노션에 써있는걸로 sudo systemctl start mongod 실행하면 실행이 안되서공식문서에서 찾아보니 sudo service mongod start를 입력하면 starting database mongod 라고 뜬 후 fail이 뜹니다.... localhost:27017로 접속을 하면 잘 뜨긴 하는데 해결 방법이 없을까요 ??
-
해결됨실전! Querydsl
PageableExecutionUtils 사용 시, count 쿼리 생략 조건
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]PageableExecutionUtils 을 사용시, count 쿼리 생략 조건에 "마지막 페이지 일 때" 라고 되어 있어서강의에 샘플 데이터 기반으로size=5, page=20 으로 마지막 페이지를 호출했는데,count 쿼리가 나가서 봤더니컨텐츠 사이즈가 0 이 아니면서 페이즈 사이즈 보다 작아야 되는 경우로 되어 있었습니다.해석하자면 카운트 쿼리 생략하는 경우가 "마지막 페이지이면서 컨텐츠 사이즈가 페이지 사이즈보다 작을 때" 인 것 같아서 의견드립니다.중복된 것이라면 죄송합니다
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
@ Controller 와 @Autowired 의미
컴포넌트 스캔과 자동 의존관계 설정 강의에서4분 6초관련하여 질문합니다. @Controller 를 하면 스프링이 MemberController 객체를 들고 있도록 해주는 것이며, 강의 자료에서는 녹색으로 동그라미 쳐져 있는 그림으로 보면 된다.@Autowired는 스프링 컨테이너에 있는 memberService를 가져와서 연결해준다..이렇게 말씀 하셨는데, 위에 제가 알아들은게 맞는 지 궁금하며, 2번 보면 memberService를 가져와서 연결해준다고 하였는데 누구랑 연결을 해준다는 건지 이해가 가질 않습니다. 그니까 Controller를 사용해서 MemberController를 등록하고 그안에서 MemberService 와 연결해주려면 Autowired를 해주면 된다는게 맞나요? 틀리다면 다시 정정해주세요
-
해결됨CUDA 프로그래밍 (2) - C/C++/GPU 병렬 컴퓨팅 - 벡터 vector 더하기
15강 Block ID 예제 오류 질문입니다.
안녕하세요?Jetson TX2 및 Xavier를 사용하여 CUDA예제를 실행하고 있습니다.Block 예제에서 tx2와 xavier의 결과가 달라서 질문드립니다.dimgrid<<<2,2,1>>>에 의해 Block의 갯수가 4개가 되고, warpid=0인 영역은 blockid가 (0,0), (1,0), (0,1), (1,1)인 곳에서 총 4개가 있을 것입니다.하지만 Tx2에서 예제를 돌려본 결과 blockid가 (0,0), (1,0)인 곳에만 나옵니다.혹시나 해서 xavier에서 실험을 해본 결과 총 4개가 나와 정상적으로 출력됩니다.CUDA언어는 GPU구조와 상관 없이 출력되기 위해 grid-block-thread 구조를 가지므로 속도는 느리지만 동일한 결과를 출력해야하는데, 왜 tx2와 xavier가 같은 예제를 돌렸는데도 다른 결과가 나오는걸까요? (혹시나 해서 <<<2,2,1>>> => <<<4,1,1>>>로 변경하여 돌려봤지만 여전히 tx2에서 blockid 2개만 출력되었습니다.)
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
강의 6강 질문
CalculatorMultiplyRequest DTO에서 다음과 같이 final을 붙여주면, postman에서 send 버튼 눌렀을 때 에러가 표시되는데 왜 그런지 알 수 있을까요?!
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
GetMapping("") 대신 ("/") 를 사용?
16강 "홈 화면 추가" 강의를 듣고 있는데, @GetMapping("/")으로 기본 홈 페이지를 만드는데 사용하셨습니다. @GetMapping("") 으로 사용해도 되는지 궁금해서 해보니까 가능한 것을 확인했습니다.@GetMapping("") 대신에 ("/") 를 사용해야 되는 이유가 혹시 있는지, 아니면 둘 중 아무거나 사용해도 상관은 없는지 궁금합니다.
-
미해결스프링 핵심 원리 - 기본편
@PreDestory 가 없어도 실행되는 이유 및 사용하는 경우
@PostConstruct의 경우 주석처리 하면 init 메서드가 실행되지 않더라구요. 근데 @PreDestory의 경우 주석처리를 해도 close 메서드가 실행되던데 @Bean 애노테이션을 이용하여 NetworkClient를 등록 할 때 destoryMethod가 생략됐고, 추론형이 발동해서? 실행되는 거 맞나요? 그렇다면 반대로 @PostConstruct의 경우에는 추론형이 없을까요? 없다면 이유는 무엇인가요? 이 @Postconstruct와 @PreDestory는 언제 사용하나요? Bean의 생명 주기를 알아야 할 필요가 있을까요?