Frontend/실습

안드로이드 앱 : 데이터베이스를 이용한 회원가입과 배포과정

qoeka 2025. 3. 6. 21:22

 

화면을 보고 데이타베이스 가 필요한것을 생각해보면

유저 테이블 필요, 메모데이블 필요 아이디 컬럼 타이틀컬럼 날자랑 시간은 따로지만 저장은 한번에 그래서 메모 데이트 컬럼있음 되겟네 

내용은 컨텍트 

메모생성된시간도 저장도 만들어야지

나머지는 수정 삭제니깐 상관없다

이제 디비버가자

 

 

 

 

      <dependency>
         <groupId>io.jsonwebtoken</groupId>
         <artifactId>jjwt-api</artifactId>
         <version>0.12.5</version>
      </dependency>
      <dependency>
         <groupId>io.jsonwebtoken</groupId>
         <artifactId>jjwt-impl</artifactId>
         <version>0.12.5</version>
         <scope>runtime</scope>
      </dependency>
      <dependency>
         <groupId>io.jsonwebtoken</groupId>
         <artifactId>jjwt-jackson</artifactId>
         <version>0.12.5</version>
         <scope>runtime</scope>
      </dependency>

 

 

dev
spring:
  datasource:
    url: jdbc:mysql://localhost:3307/memo_db
    username: admin
    password: 비번
  jpa:
    show-sql: true
    
    
 prod
 spring:
  datasource:
    url: jdbc:mysql://edu-db.c7kc8oqayzer.ap-northeast-2.rds.amazonaws.com:3306/memo_db
    username: admin
    password: 비번
  jpa:
    show-sql: true


server:
  port: 80

 

 

 

 

설계완료 만들러가겟다

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:fitsSystemWindows">true</item>

 

 

 

 

implementation("com.squareup.retrofit2:retrofit:2.11.0")

    implementation("com.squareup.retrofit2:converter-gson:2.11.0")

    implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

 

 

 

    <uses-permission android:name="android.permission.INTERNET"/>

 

 

 

 

우리서버에 통신해야하니깐 로컬호스트에 8080이니깐 컨피그에 넣어야한다

http://localhost:8080/

 

 

안드로이드 스튜디오 기본설정 완료

 

 

 

editEmail

editPassword

editNickname

btnSignUp

txtLogin

아이디 설정까지 완료

 

토큰이 있냐 없냐 체크해야한다

 

앱처음실해하는건 메인엑티비티 그래서 메인에티비티에서 

화면이 나오기 전에 로그인 유무 체크

 

쉐어드 프린퍼런스에 저장되있는지 확인한다

 

 

하드코딩하지 말고 가져와서 하자

 

 

 

레트로리핏 라이브러리 이거 면접 통신했습니다 라고 말하기