※ 부서는 상위 부서정보를 갖고 N명의 멤버 정보를 갖는다 @Data@Entity@Table(name = "dept")public class Department implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue @Column(name = "dept_id") private int deptId; @Column(name = "pdept_id") private int pdeptId; @Column(name = "mem_id") private int memId; @OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL) @Fetch(FetchMo..
※부서는 하위 부서정보를 갖는다. @Data@Entity@Table(name = "dept")public class Department implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue @Column(name = "dept_id") private int deptId; @Column(name = "pdept_id") private int pdeptId; @Column(name = "mem_id") private int memId; @OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL) @JoinColumn(name = "pdept_id..
데이터를 csv 파일에서 로드하여 DB에 insert 하는데 데이터 중간에 , (콤마)가 있는 데이터는 " (더블쿼테이션) 으로 감싸져있다. 내가 작성하던 소스는 row별 데이터를 ,로 split 하고 있었는데... opencsv를 발견하고 초 간단하게 해결! http://opencsv.sourceforge.net/ CSVReader reader = new CSVReader(new FileReader("yourfile.csv")); String [] nextLine; while ((nextLine = reader.readNext()) != null) { // nextLine[] is an array of values from the line System.out.println(nextLine[0] + ne..
- Total
- Today
- Yesterday
- db connect
- JPA
- 서버 환경변수
- Big xml 파싱
- StAX
- could not initialize proxy - no Session
- tomcat
- Elasticsearch
- cloudsearch 비용
- aws cloudsearch
- iTerm
- JoinColumn
- JPA 오류
- org.hibernate.LazyInitializationException
- ojdbc7
- 엘라스틱서치
- CloudSearch
- oracle12
- timestamp
- getdate
- OneToMany
- 단축키
- Python
- 계층형
- #csvreader
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |