본문 바로가기

개발중

(617)
스프링 서버에 액셀 파일 업로드 액셀 파일 업로드 Controller @ApiOperation(value = "Excel File 저장", notes = "✅ Excel File 저장 합니다.\n - \n " ) @PostMapping(value = "/") public int excelData( @ApiParam( name = "filePath", type = "MultipartFile", value = "학습 데이터 파일 경로", example = "", required = true ) @RequestParam(value="filePath") MultipartFile tdiFilePath, HttpServletRequest request) { ExcelService service = new ExcelService(); service..
AWS 내가 모르는곳에서 계속 요금이 발생할떄 찾는법 AWS 내가 모르는곳에서 계속 요금이 발생할떄 찾는법 aws 계정 해지 환불 신청 환불 신청 참고 블로그 나는 3개월 동안 AWS 에선 돈이 빠져나가고 있었다. 공부만 했을 뿐인데, 그래서 아래처럼 문의를 했다. 나의 문의 더보기 Please, I request a refund. I thought I'd shut down everything I was using on aws. I was embarrassed that the money was withdrawn. This is an account made for aws study. This is an account made for aws study. I've been losing money for three months. I request a refund...
특정 문자열이 배열안에 존재 하는지 여부/확인 배열에 내가 원하는 속성을 나열해두고 받은 파라메터가 내가 원한 속성이 아니라면 에러를 떨어뜨리는 경우가 종종 있다. 그때 사용 하려고 기록. int true final int[] binsooList = { 1, 2, 3, 4 }; int num = 9; boolean java8 = IntStream.of(binsooList).anyMatch(x -> x == num); false final int[] binsooList = { 1, 2, 3, 4 }; int num = 3; boolean java8 = IntStream.of(binsooList).anyMatch(x -> x == num); String true final String[] BinsooList = { "A", "B", "C", "D", "..
java.lang.NumberFormatException: For input string: "" @ApiParam( value = "Paging Limit Num", name = "limitNum", type = "int", example = "") @RequestParam (value="limitNum", defaultValue="0")​ java.lang.NumberFormatException: For input string: "" WARN i.s.m.p.AbstractSerializableParameter - Illegal DefaultValue 0 for parameter type integer java.lang.NumberFormatException: For input string: "" at java.base/java.lang.NumberFormatException.forInputStri..
mybatis vo null 처리 - NullPointerException mybatis 에서 SelectOne 으로 데이터를 가지고 올 때 Data 가 없는 경우에는 500 에러가 발생한다. Otinal 을 이용해서 null Check 를 하고 싶었는데 Optinal 사용법이 미숙해서 사용법 숙지가 필요할 것 같다. 그래서 내가 해결한 방법은 Dao 에서 Data 를 받아왔을 때 vo 가 null 이라면 NullPointerException 이 발생할 것이고, 그럴 경우 새 객체를 생성해준다. vo = dao.selectKeword(vo); try { int keywordSeq = vo.getKeyword_seq(); } catch (NullPointerException e) { vo = new CategoryBasicVo(); }
My sql Like 여러개 : ) 이름 속성 안에 'ㄱ' OR 'ㄴ' OR ㄷ' 를 쿼리를 뽑고 싶다면 ✅ 이렇게 보내주세요. String NAME = "ㄱ|ㄴ|ㄷ"; ✅ 쿼리를 이렇게 써주세요. AND 이름 REGEXP '${NAME}' ✅ 이렇게 날라갈 꺼에요. AND 이름 REGEXP 'ㄱ|ㄴ|ㄷ'
@ApiParam 과 @RequestParam 의 차이점 🖤 글이 도움이 되었다면 유튜브 클릭 해주세요 🖤 비전공자 개발자 관련 영상 ApiParam 과 RequestParam 의 차이점 REST API 로 개발하면서 아래처럼 파라메터를 받기로 적기는 적는데 "왜 param 을 두개나 적어줄까?" 라는 의문이 들었다. @ApiParam( value = "BIN SOO", name = "binsoo", type = "String", example = "jung bin soo", required = false) @RequestParam(defaultValue="") String binsoo , ApiParam은 문서 자동화를 위한 Swagger에서 쓰이는 어노테이션이고 RequestParam은 http 로부터 요청 온 정보를 받아오기 위한 스프링 어노테이션이다. ..
REST API 의 Mapping 방법 정리 REST API 의 Mapping 방법 정리 REST API 로 개발을 하면서 신기한 점이 있는데 매번 헷갈려서 한번 더 정리하고 넘어가야 겠다. 아래와 같이 /jung/binsoo 라는 URL이 있을 때 이 하나의 URL에서 하는 일은 여러가지가 될 수 있다. 예를 들어 SELECT, INSERT, DELETE, UPDATE 등.. @RestController @Api(tags = {"Binsoo"}) @RequestMapping("/jung/binsoo") public class binsooController { } 기존에는 아래처럼 4개의 url 을 매핑해줬어야 했는데 /jung/binsoo/select /jung/binsoo/insert /jung/binsoo/update /jung/binsoo/..