- 9-10
스프링버전 이클립스
https://spring.io/
https://spring.io/tools
Spring Tools 4 for Eclipse 다운로드
다운받은 파일 우클릭으로 압축 풀어주고 content도 압축 풀어주고 들어가면
SpringToolSuite4.exe가 스프링 이클립스
JSP파일 사용 불가하기 때문에 web관련 라이브러리 따로 설치해줘야함
Eclipse Marketplace에서 'web developer' 검색 후 EE버전(jsp가 포함되어있는걸로) 설치
[Eclipse Enterprise Java and Web Developer Tools 3.27] 다운했음
프로젝트 롬복(이클립스 새로 받을때마다 해줘야함)(스프링이클립스에도 해줘)
https://projectlombok.org/
https://projectlombok.org/download 다운로드
jar 실행
https://www.ihee.com/470
1. 더블클릭하거나
2. cmd창에서
C:\Users\Administrator>E:
E:\>cd E:\KDT\tools
E:\KDT\tools>java -jar lombok.jar
lombok.jar 실행하고 이클립스.exe가 있는 폴더를 지정해주고 설치
이클립스 폴더에 lombok이 쏙 들어가져있는지 확인~
- 10-11
스프링 스프링부트 차이점..?
https://programforlife.tistory.com/68
- 11-12
Maven Gradle 빌드 장단점 차이점 찾아봐
https://jisooo.tistory.com/entry/Spring-%EB%B9%8C%EB%93%9C-%EA%B4%80%EB%A6%AC-%EB%8F%84%EA%B5%AC-Maven%EA%B3%BC-Gradle-%EB%B9%84%EA%B5%90%ED%95%98%EA%B8%B0
jar? war?
https://ko.wikipedia.org/wiki/JAR_(%ED%8C%8C%EC%9D%BC_%ED%8F%AC%EB%A7%B7)
https://ko.wikipedia.org/wiki/WAR_(%ED%8C%8C%EC%9D%BC_%ED%8F%AC%EB%A7%B7)
메이븐 저장소 Maven repository
https://mvnrepository.com/
누락된 거 있으면 저장소에서 필요한거 검색해서 갖다 붙여(build.gradle의 dependencies에)
/springWeb02/src/main/java
자바 소스는 여기에
/springWeb02/src/main/resources
나머지는 여기에
/springWeb02/src/main/resources/templates
HTML
/springWeb02/src/main/resources/static
공유로 쓰는 자원들 위치(ex.이미지, css, java script 등)
/springWeb02/src/main/java/com/green/nowon/SpringWeb02Application.java
SpringWeb02Application.java 우클릭 > Run as > Spring Boot App 누르면
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
마이바티스때문에 일어나는 오류 build.gradle의 dependencies에서 mybatis 주석처리해주고
프로젝트 우클릭 > Gradle > Refresh Gradle Project 해주고 다시 Run하면 성공
인터넷 창 열고 localhost:8080 치면 페이지 나옴
다시 주석 풀고 프로젝트 우클릭 > Gradle > Refresh Gradle Project
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
/springWeb02/src/main/resources/application.properties
여기에 DataSource 정보 작성해줘야함
spring.datasource.hikari.jdbc-url=jdbc:oracle:thin:@127.0.0.1:1521:xe
HikariCP
https://brunch.co.kr/@jehovah/24
- 12-1
https://mybatis.org/spring/getting-started.html
Quick Setup
- 2-3
https://wooono.tistory.com/261
extends? implements?
extends
부모에서 선언/정의를 모두하며, 자식은 오버라이딩 할 필요 없이 부모의 메소드/변수를 그대로 사용할 수 있다.
"부모의 특징을 연장해서 사용한다."라고 기억하면 될 듯!
implements (interface 구현)
부모 객체는 선언만 하며, 정의는 반드시 자식이 오버라이딩해서 사용한다.
"부모의 특징을 도구로 사용해 새로운 특징을 만들어 사용한다."라고 기억하면 될 듯!
abstract
extends와 interface의 혼합이다.
extends를 사용하지만, 몇 개는 추상 메소드로 구현되어 있다.
(MybatisConfig.java)
https://mybatis.org/spring/sqlsession.html
SqlSessionTemplate : MyBatis-Spring의 핵심
https://mybatis.org/spring/mappers.html
<mybatis:scan> 매퍼
- 3-4
lombok
@Data
@Getter
@Setter
@toString
추상메서드
스프링 들어오고 나서 뭔 소리하는건지 1도 이해 안됨
(member-mapper.xml)
https://mybatis.org/mybatis-3/getting-started.html#exploring-mapped-sql-statements
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.mybatis.example.BlogMapper">
<select id="selectBlog" resultType="Blog">
select * from Blog where id = #{id}
</select>
</mapper>
- 4-5
ant 경로 패턴
https://chinggin.tistory.com/257
깃허브토큰
우선적으로 깃에서 repository를 프로젝트명으로 만들고 시작한 후 주소 복사하고 시작하자(주소가 복사되어 있어야 자동으로 주소가 잡힘)
프로젝트 우클릭 > Team > Share Project > Use or create repository in parent folder of project 박스 체크하고 프로젝트 선택하여 create repository > Finish
프로젝트 우클릭 > Team > commit 누르면 Git Staging 탭으로 이동됨
원하는 폴더, 파일 선택하여 commit message 입력하고 commit and push
push 안됐으면 Git Repository 탭으로 와서 Branches > Local 폴더에 master를 확인하시고
우클릭 > Push Branch 하면됨 ID입력하고 password에는 토큰 넣어주면 됨(세번)
'개발일기' 카테고리의 다른 글
학원 수업 40일차 221018 (0) | 2022.11.18 |
---|---|
학원 수업 39일차 221017 (0) | 2022.11.18 |
학원 수업 38일차 221014 (0) | 2022.11.18 |
학원 수업 37일차 221013 (0) | 2022.11.17 |
학원 수업 35일차 221011 (0) | 2022.10.31 |
학원 수업 34일차 221007 (0) | 2022.10.31 |
학원 수업 33일차 221006 (0) | 2022.10.31 |
학원 수업 32일차 221005 (0) | 2022.10.27 |
댓글