1.java17 다운 https://www.oracle.com/java/technologies/downloads/#jdk21-windows installer를 눌러서 다운 받는다. 명령 프롬프트에서 java 설치가 제대로 되었는지 확인한다. 2.intellij
dependencies를 살펴보면 HTML을 만들어주는 템플릿 엔진 Thymeleaf와 web 그리고 자동으로 들어온 test가 있는데 External Libraries로 가서 실제 라이브러리들을 모두 확인해보면굉장히 많은 라이브러리들이 들어가 있다.Gradle이나 M
Welcome page 만들기 resources-static에서 index.html 파일을 하나 생성한다. html코드를 넣어준다. Welcome page
다음과 같은 순서로 진행한다.cmd 창에서 spring 프로젝트가 있는 폴더로 이동한다.cd>폴더 경로gradlew 명령어를 실행해준다.gradlew buildgradlew.bat실행파일 (.jar) 찾기cd builddir실행cd build/libsjava -jar
웹 개발에서는 크게 세 가지 방법이 있다.1\. 정적 컨텐츠: 파일을 웹브라우저에 그대로 내려주는 방식이다.2\. MVC와 템플릿 엔진: HTML을 서버에서 프로그래밍을 해서 동적으로 바꾸고 내려주는 것을 말하며 모델, 템플릿 엔진, 화면 이 세 가지를 model-vi
MVC: Model, View, ControllerMVC란 Model-View-Controller를 의미한다.과거에는 Controller와 View가 따로 분리되어 있지 않았다.요즘은 View는 화면을 그리는데 모든 역량을 집중하고 Controller는 로직과 관련된
정적 컨텐츠, MVC 외에도 API를 쓰는 방식이 있는데 정적 컨텐츠를 제외하고 두 가지만 기억하면 된다. HTML로 내릴 것인지 API 방식으로 데이터를 바로 내릴 것인지 >#### Controller 추가 controller/HelloController에서 co
데이터: 회원ID, 이름기능: 회원 등록, 조회DB가 선정되지 않음(가상 시나리오)컨트롤러: 웹 MVC 컨트롤러 역할서비스: 서비스 클래스의 핵심 비즈니스 로직이 들어가며 비즈니스 도메인 객체를 가지고 핵심 비즈니스 로직이 동작하도록 구현한 객체도메인: 회원, 주문 등
com.example.spring에 domain package를 생성한다.Member라는 class를 만들어준다.
회원 repository 클래스가 원하는 대로 동작하는지 검증하는 방법이 있는데 이때 test case를 작성해서 검증을 한다. 코드를 코드로 작성해서 검증하는 것이다.
회원 서비스는 회원 repository와 domain을 활용하여 실제 비즈니스 로직을 작성한다.먼저 service package를 생성한 후 MemberService class를 만들어준다.memberRepository에 save를 호출 해주면 된다.회원가입 로직 중에
MemberService class에서 단축키 Ctrl+Shift+T를 사용하면 Create New Test가 뜨는데 Test를 할 수 있도록 자동 생성해준다.(테스트코드는 실제코드에 포함되지 않기 때문에 한글을 사용해도 괜찮다.)멤버 서비스에서 findOne으로 찾아
스프링 빈 등록 & 의존 관계 설정
\->회원 서비스와 회원 리포지토리의 @Service, @Repository, @Autowired 애노테이션을 제거하고진행