전체 글

전체 글

    스프링 기본 - 섹션1 객체 지향 설계와 스프링

    먼 옛날 EJB라는 현재의 스프링과 같은 기능을 했지만 너무 복잡하고 성능도 안나오는 지옥시절이 있었다. 이게 너무 불편해서 순수 자바로 돌아가서 다시 스프링 만들었다. 알맹이는 스프링 프레임워크. 여기 안에 모든 핵심 기술들 다 들어가 있는 거고 부트는 도와주는 역할(패키지 매니저, 서버 열어주기 등). 스프링이 왜 좋나면 객체지향의 강점을 최대로 이끌어 내는거고, 객체지향이 좋은 이유는 다형성(Polymorphism) 때문임. 흔히 예시로 드는 자동차인데 한 0.2초정도 아하 하고 이해한듯 하다가 다시 의문을 가지는 예시다. 객체지향이 왜 좋은지 모르겠다면, 반대로 안쓰고 함수만을 써서 한다고 생각해보자. 위 자동차 예시는 이제 핸들 위치, 페달 위치 그런게 interface로 함수 이름 등이 정해져..

    스프링 입문 - 섹션7 AOP

    @Component @Aspect public class TimeTraceAop { @Around("execution(* hello.hellospring..*(..))") public Object execute(ProceedingJoinPoint joinPoint) throws Throwable { long start = System.currentTimeMillis(); System.out.println("START: " + joinPoint.toString()); try { return joinPoint.proceed(); } finally { long finish = System.currentTimeMillis(); long timeMs = finish - start; System.out.printl..

    스프링 입문 - 섹션6 스프링 DB 접근 기술

    이 섹션 강의 목차는 이렇다. 물론 내가 볼거라 대충 쓸거임 - H2 데이터베이스 설치 - 순수 Jdbc - 스프링 통합 테스트 - 스프링 JdbcTemplate - JPA - 스프링 데이터 JPA H2 데이터베이스 설치는 별거 없고 resources의 application에 datasource로 연결해준다는 것만 알면 된다. 순수 Jdbc이전에, Jdbc는 자바랑 데이터베이스랑 connect만 해주는거라 안의 세부 내역은 직접 매핑을 해줘야 한다. sql문 짜서 결과 나오면 그걸 내 클래스 멤버의 어디에 대입해주고.. 하는거. 사용하기엔 너무 옛날 기술이라 이제 안쓰지만 이런게 세부적으로 작성된다는 것 정도는 알고 있어야 이해할 수 있다. configure로 설정 변경해주고 다음에 구체적인 과정을 작성..

    스프링 입문 - 섹션4 스프링 빈과 의존관계

    일단 의존관계가 뭐고 왜 나오는지 부터 생각하자. public class MemberService { MemberService memberService = new MemberService(); MemoryMemberRepository memberRepository = new MemoryMemberRepository(); // ... } 서비스에서 레퍼지토리 객체를 직접 만드는 식으로 하면, 다른 서비스에서도 새로 만들면 서로 다른 데이터베이스(레퍼지토리)를 볼 수 있는 일이 생긴다. 그래서 꼬일 수 있으니 하나만 보게 하기 위함. 또 어차피 같은 일을 하니 하나만 만들어서 계속 쓰는 의미도 있음. 이를 싱글톤이라고 함. 의존관계는 해당 기능을 원하는 클래스가 그 클래스의 인스턴스를 주입 받아서 사용하는 ..

    만든 이유

    https://www.youtube.com/watch?v=ZgtvcyH58ys 김영한님 강의라고 하면 다 엄청좋다고 하는데 블라인드 힙스터들은 "국비충 특: 블로그 김영한 강의" 이러면서 놀리고 안좋은 시선으로 본다. 난 자바를 싫어해서 억지로 다른걸 하려고 했지만.. 나도 이제 인정하고, 사람들이 많이 하는데는 이유가 있고, 토이프로젝트로 만들어봤지만 깊이가 없었다. 엘리트분들은 언어는 중요하지 않고 실력이 중요하다고 했지만.. 난 엘리트가 아니다. 취업 풀도 파이썬은 별로 없고 선택권도 많지 않다. 나한텐 언어가 중요하다. 최종목표도 자바를 쓰고 있고. 난 내가 잘한다고 생각한 적이 한번도 없다. 가끔 자뻑할때가 있었겠지만 딱 그정도고..

    [게시판 서버] spring boot 원격 서버에 올려서 배포하기

    https://isolia.shop/ Isolia isolia.shop (언제까지 열어놓을지는 모르겠지만..) https://github.com/sglee487/isolia/tree/fa5f2bdd7aecf67516dfe14ac61b02e274b602e0 GitHub - sglee487/isolia: https://isolia.shop/ https://isolia.shop/. Contribute to sglee487/isolia development by creating an account on GitHub. github.com https://github.com/sglee487/isolia-spring-api/tree/8827fab436508a33d8684cedcb4b84feef397646 GitHub ..

    [게시판 서버] 구글 SNS 로그인 구현하기

    https://github.com/sglee487/isolia-spring-api/tree/e83aa6a850de8f3770f2c9a78b17c9fa673c592e GitHub - sglee487/isolia-spring-api: change FastAPI to Spring boot change FastAPI to Spring boot. Contribute to sglee487/isolia-spring-api development by creating an account on GitHub. github.com https://github.com/sglee487/isolia/tree/8ce6773e88879d83910a3b3d4253579ea3e00c72 GitHub - sglee487/isolia: htt..

    [소켓 서버] 소켓 연습용 지뢰찾기 게임 멀티 만들기

    https://github.com/sglee487/isolia/blob/f3ed6eef3c61d689322dbd2173f698a4266d2be5/src/mores/MineSweeper.vue GitHub - sglee487/isolia: https://isolia.shop/ https://isolia.shop/. Contribute to sglee487/isolia development by creating an account on GitHub. github.com https://github.com/sglee487/isolia-spring-api/blob/e1048f811a0c76723b19a21dc22b95aa522d075a/src/main/kotlin/com/group/isolia_api/contro..

    [게시판 서버] 사이트랑 연결하기

    https://github.com/sglee487/isolia-spring-api/tree/7b7b13404ea4460dad310c381d8f600bbecf7e3a GitHub - sglee487/isolia-spring-api: change FastAPI to Spring boot change FastAPI to Spring boot. Contribute to sglee487/isolia-spring-api development by creating an account on GitHub. github.com https://github.com/sglee487/isolia/tree/449a1389312198a65b29454dbcf2693b2e97f309 GitHub - sglee487/isolia: htt..

    [게시판 서버] Querydsl으로 변환(별거없음)

    https://github.com/sglee487/isolia-spring-api/tree/c8cef15bed5b12a2ab28e1549d4b0d3f4455a455 GitHub - sglee487/isolia-spring-api: change FastAPI to Spring boot change FastAPI to Spring boot. Contribute to sglee487/isolia-spring-api development by creating an account on GitHub. github.com 해야할 필요성은 딱 두가지다. JpaRepository를 통해 해당 정보르 다 불러와도 Response 형태에 맞추기 위해 어차피 쳐내는 정보로 성능 손실이 있다는 것, 즉 내가 예전에 FastAP..