반응형 전체 글335 [JPA] Entity 설정하기 @Entity@Entity // JPA 의 Entity class 라고 지정 public class Board { ... ...} @Entity(name = "Board") // name 으로 class 를 지정하기도 하는데 없으면 default 로 class 명을 따라간다 public class Board { ... ...} @Table@Entity // JPA 의 Entity class 라고 지정@Table(name = "Board") // Entity 와 연결할 Table 명을 지정public class Board { ... ...} @Id@Entity .. 2024. 11. 13. [JPA] DELETE 하기(Delete , DeleteById , DeleteAll) JPA 에서 Repository 를 통한 기본 Delete 는Delete, DeleteById , DeleteAll 가 있다 Delete() - Entity 를 객체로 받아서 삭제@Repositorypublic interface BoardRepository extends JpaRepository {}JpaRepository 를 상속받는다 @RestController@RequestMapping("/api/*")public class BoardController { @Autowired private BoardRepository boardRepository; @PostMapping("/boardDelete") public void boardDelete() throws.. 2024. 11. 12. [JPA] INSERT , UPDATE 하기(Save , SaveAll) JPA 에서 INSERT 와 UPDATE 는Save() 함수로 동작한다 Save() - INSERT 하기@Repositorypublic interface BoardRepository extends JpaRepository {} JpaRepository 를 상속받는다 에서 BoardVo 는 Entity 를 설정한 class 이며, Long 은 PK 컬럼의 데이터 타입이다 @RestController@RequestMapping("/api/*")public class BoardController { @Autowired private BoardRepository boardRepository; @PostMapping("/boardSave") public void boardSave(.. 2024. 11. 11. [JPA] SELECT 하기(findBy , @Query , @Param , where , and , if test) https://docs.spring.io/spring-data/jpa/reference/jpa/query-methods.html#jpa.query.spel-expressions JPA Query Methods :: Spring Data JPAAs of Spring Data JPA release 1.4, we support the usage of restricted SpEL template expressions in manually defined queries that are defined with @Query. Upon the query being run, these expressions are evaluated against a predefined set of variables. Sprindocs.sp.. 2024. 11. 10. [티스토리] Book Club 스킨 글 제목 수 늘리기 글을 작성하다 보면 제목이 길어서 잘리는 경우가 종종 있다내가 보려고 올리는데 내가 보기 힘들다... 관리 - 스킨편집 - html 편집 - CSS 순으로 들어간다 1171 라인에 white-space 를 고쳐줘야 한다CSS 를 딱히 건들지 않았다면 해당 라인에 있을 테지만해당 라인과 일치하지 않는다면 .post-item .title 클래스 명을 찾아서 바꾸면 된다 nowrap 을 nomal 로 바꿔준다 제목이 잘리지 않고 다 나오고 있다모바일에서도 적용되는데 너무 긴 제목은 결국 잘려서 나온다 그리고 티스토리 앱에서는 적용이 안되는 거 같으니 참고하길 바란다 display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: .. 2024. 11. 9. [SpringBoot] React + TypeScript + JPA 프로젝트 (7) - 게시판 만들기(글 작성) 이전글https://greed-yb.tistory.com/309 [SpringBoot] React + TypeScript + JPA 프로젝트 (6) - 게시판 만들기(페이징 처리)이전글https://greed-yb.tistory.com/308 [SpringBoot] React + TypeScript + JPA 프로젝트 (5) - 게시판 만들기(목록)이전글https://greed-yb.tistory.com/307 [SpringBoot] React + TypeScript + JPA 프로젝트 (4) - 회원가입, 로그인 하greed-yb.tistory.com board.tsx......... 게시판 목록 글 작성 .. 2024. 11. 8. 이전 1 2 3 4 5 6 7 8 ··· 56 다음 반응형