inblog logo
|
Coding_study
    Spring

    git clone이 아닌 방법으로 코드 다운받아 기본 세팅하기

    yuzu sim's avatar
    yuzu sim
    Jan 30, 2024
    git clone이 아닌 방법으로 코드 다운받아 기본 세팅하기

    1. project from version control
    다양한 IDE에서 이 기능을 사용하여 버전 관리 시스템과 연동하여 프로젝트를 가져올 수 있음
    notion image
     
    URL은 강사님의 레파지토리 주소 복붙
    “\blog” 추가해서 경로 잡기
    notion image
     
    💡
    git log : 기록 확인하기
    notion image
     
    헤더를 옮길 부분 찾기 - 화면 구현 완료
    notion image
     
    헤더 옮기기
    git reset --hard (hash코드 앞자리 4개)
    notion image
     

    application.yml에서 선택해서 적용하면 됨

    개발 환경과 배포 환경을 다르게 만들기
    notion image
    spring: profiles: active: - dev
    server: servlet: encoding: charset: utf-8 force: true port: 8080
    notion image
     
    spring: profiles: active: - prod
    server: servlet: encoding: charset: utf-8 force: true port: 5000
    notion image
     
    헤더에 nav가 있음 : 시멘틱 택그
     
    {{> /layout/header}} <div class="container p-5"> <!-- 요청을 하면 localhost:8080/join POST로 요청됨 username=사용자입력값&password=사용자값&email=사용자입력값 --> <div class="card"> <div class="card-header"><b>회원가입을 해주세요</b></div> <div class="card-body"> <form action="/join" method="post" enctype="application/x-www-form-urlencoded"> <div class="mb-3"> <input type="text" class="form-control" placeholder="Enter username" name="username"> </div> <div class="mb-3"> <input type="password" class="form-control" placeholder="Enter password" name="password"> </div> <div class="mb-3"> <input type="email" class="form-control" placeholder="Enter email" name="email"> </div> <button type="submit" class="btn btn-primary form-control">회원가입</button> </form> </div> </div> </div> {{> /layout/footer}}
    {{> layout/header}} <div class="container p-5"> <div class="card mb-3"> <div class="card-body"> <h4 class="card-title mb-3">제목1</h4> <a href="/board/1" class="btn btn-primary">상세보기</a> </div> </div> <ul class="pagination d-flex justify-content-center"> <li class="page-item disabled"><a class="page-link" href="#">Previous</a></li> <li class="page-item"><a class="page-link" href="#">Next</a></li> </ul> </div> {{> layout/footer}}
    머스태취 문법
    {{> layout/header}} // layout파일에 있는 header의 내용이 여기 있는 것 {{> layout/footer}} // layout파일에 있는 footer의 내용이 여기 있는 것
    notion image
    notion image
    notion image
     
    git remote -v // 연결지 확인
    남의 걸 다운 받은면 내가 원하는 위치로 헤더를 이동해야함
    git reset --hard (hash코드 앞자리 4개) // 헤더 옮기기
     
    이 연결을 끊어야함
    git remote rm origin // 연결 끊기
    git이 돌고 있으니 연결만 하면 됨 / init 할 필요가 없음
    새 레파지토리 만들어서 연결하기
    git remote add origin 주소 // 연결하기
    notion image
     
    Share article

    Coding_study

    RSS·Powered by Inblog