728x90
반응형
- [ Spring/Spring framework ][JPA] boot3 데이터 DB 입출력2021-08-06 12:23:38https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods JPA keyword는 여기서 찾자! Spring Data JPA - Reference Documentation Example 109. Using @Transactional at query methods @Transactional(readOnly = true) interface UserRepository extends JpaRepository { List findByLastname(String lastname); @Modifying @Transactional @Query("delete from User u where u.active = false") v..
- [ Spring/Spring framework ]환경오류2021-08-06 07:54:21**tomcat 폴더에 jslt 넣으면 바로해결가능
- [ Spring/Spring framework ]Entity2021-08-05 16:05:39https://data-make.tistory.com/610 [JPA] 엔티티와 매핑. @Entity, @Table, @Id, @Column.. | 엔티티와 매핑 객체와 테이블 매핑 : @Entity, @Table 기본 키 매핑 : @Id 필드와 컬럼 매핑 : @Column 연관관계 매핑 : @ManyToOne, @JoinColumn 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23.. data-make.tistory.com
- [ Spring/Spring framework ]@Id @GeneratedValue2021-08-05 15:43:59https://jsaver.tistory.com/entry/Id%EC%99%80-GeneratedValue-%EC%95%A0%EB%85%B8%ED%85%8C%EC%9D%B4%EC%85%98 @Id와 @GeneratedValue 애노테이션 출처 : http://younghoe.info/456 @Id는 해당 프로퍼티가 테이블의 주키(primary key) 역할을 한다는 것을 나타낸다. 속성에 직접 @Id를 붙여주면 실행시점에 객체의 필드를 통해 직접 접근하게 하는 것이며, jsaver.tistory.com
- [ Spring/Spring framework ]JPA : Supported keywords inside method names2021-08-05 15:05:45https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.query-creation Spring Data JPA - Reference Documentation Example 109. Using @Transactional at query methods @Transactional(readOnly = true) interface UserRepository extends JpaRepository { List findByLastname(String lastname); @Modifying @Transactional @Query("delete from User u where u.active = false") void de..
- [ Spring/Spring framework ]Spring Boot2021-08-04 14:05:12난해한 스프링을 좀 더 쉽게? http://www.yes24.com/Product/Goods/43828577?OzSrank=1 https://spring.io/tools Spring Tools 4 is the next generation of Spring tooling Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-based enterprise applications, whether you prefer Eclipse, Visual Studio Code, or Theia IDE. spring.io Spring tools 다운 4.11.0 ** springBoot은 톰캣이 내장되어있다.
- [ Spring/Spring framework ]12021-08-04 11:51:24org.springframework spring-context-support ${org.springframework-version} com.sun.mail javax.mail 1.5.6 AdminController 이메일 받는거 설정 값은 JSP에서 넘기는 name 의 값이다. package com.cos.controller; import javax.inject.Inject; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annota..
- [ Spring/Spring framework ]Command 사용 Board2021-08-03 16:23:18라이브러리에 mybatis추가 안해도됨 package com.bit.springBoard.controller; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.bit.springBoard.command.BoardCommand; import com.bit.springBoard.co..
- [ Spring/Spring framework ]Mybatis이용한 Board22021-08-03 16:14:42mybatis 설정은 앞에 있음 package com.bit.springBoard2.controller; import org.apache.ibatis.session.SqlSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.bit.spri..
- [ Spring/Spring framework ]Board2021-07-30 16:30:40프로젝트명 : springBoard 1.package : com.bit.springBoard 2.테이블 : table.sql 3.web.xml에 한글처리 4.dao, dto, command, controller 패키지 생성 5.springNote의 pom.xml을 참고 추가 6.dto/BoardDto.java 생성 7.main.jsp에 home 액션 호출 8.server.xml에 Context안에 추가 9.BoardDao,BoardCommand,BoardController 구현
- [ Spring/Spring framework ]Mybatis2021-07-29 15:05:14https://ko.wikipedia.org/wiki/%EB%A7%88%EC%9D%B4%EB%B0%94%ED%8B%B0%EC%8A%A4 마이바티스 - 위키백과, 우리 모두의 백과사전 ko.wikipedia.org 한글관련 깨짐은 앞에 필터를 추가해주면 되니 여기서 언급은 안함 Mybatis를 사용하기 위한 라이브러리 추가 앞에서 2개를 추가해주었따. Mybatis를 사용하지 않으려면 아래 코드에서 mybaits 관련 2개만 지워주면 된다. org.springframework spring-jdbc ${org.springframework-version} commons-dbcp commons-dbcp 1.4 com.oracle.database.jdbc ojdbc6 11.2.0.4 org.projectlombo..
- [ Spring/Spring framework ]DB연결 코드와 자주 쓰는 코드 지정해두기2021-07-29 14:52:28태그 안에 추가 **주의 : 빨간 박스위에 코드에 이렇게 되어있는걸 해제하고 그 안에 넣어야함 org.springframework spring-jdbc ${org.springframework-version} commons-dbcp commons-dbcp 1.4 com.oracle.database.jdbc ojdbc6 11.2.0.4 org.projectlombok lombok 1.18.10 provided 자주쓰는 코드 지정해두기 db를 치고 컨+스페이스 > 자동완성 select Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; String sql = null; try { con = ds.getConnection(); ..
728x90
반응형