Mybatis Insert 한 key값 바로 반환

테이블에 자료를 INSERT를 할 경우, 생성 되어진 Key값을 재사용하고 싶은 경우가 있다. Service.java Mapper mapper = sqlSession.getMapper(Mapper.class); HashMap<String, Object> param = ...; //{value1:"value1", value2:"value2"} int resultCount = mapper.insertAabooTable(param); //새로 인서트된 Row의 key값은 어떻게 가져오지? Mapper.java (interface) int insertAabooTable(@Param("param") Map<String, Object> param); Mapper.xml <insert id="insertAabooTable" parameterType="com.company.aaboo.AabooInsertDto"> INSERT INTO aabooTable (idx, value1, value2) VALUES ( (SELECT MAX(idx)+1 … 계속 읽기 Mybatis Insert 한 key값 바로 반환

리눅스 gzip, gunzip, tar

.gz 형태로 파일 압축 gzip [option] [file_name] //압축해서 aaa.txt.gz 파일로 압축됨(-9:압축률 -v:보기) $ gzip -9v aaa.txt //압축해제 $ gzip -d aaa.txt.gz [option] -n: n은 1부터 9까지 숫자로, 1이 가장 빠르지만 압축률은 가장 낮음-c: 압축 결과를 출력하고 원본파일은 그대로 놔둠-d: 압축 해제-f: 강제 압축-r: 디렉토리 지정시 디렉토리에 포함된 모든 파일 압축-t: 압축 파일 테스트-v: 압축 혹은 해제시 자세한 … 계속 읽기 리눅스 gzip, gunzip, tar