분류 전체보기52 ResponseBody 어노테이션 사용법 @ResponseBody (ResponseBody 어노테이션):HTTP에서 BODY 쪽에 return 데이터를 직접 넣어주겠다는 뜻임 ☝ 예제@GetMapping("hello-string")@ResponseBodypublic String helloString(@RequestParam("name") String name) { return "hello " + name; } 만약 @RequestParam(”name”) 여기 부분에 ‘stone’을 넣는다면 return 값은 “hello stone" 이 될 것이다.그래서 템플릿 엔진과 다르게 해당 문자열을 직접 뷰에 보낸다는 의미이다.(↔템플릿은 뷰 리졸버(View Resolver)에게 ‘나랑 맞는 애를 찾아줘’하고 요청을 던져서 화면에 출력함) ✌ 예제@.. 2023. 12. 19. 스프링부트 SecureRandom 예제 관리자페이지 생성 후 관리자 등록 시, 임의의 비밀번호를 생성해서 발급해주려 한다. 임의의 난수를 만드는 함수로는 Random, SecureRandom이 있는데 그중에서도 SecureRandom이 암호적으로 더 강력한 난수를 만들어주는 클래스라고 하기에 사용해 보았다. ✨ SecureRandom 관련 내용은 하단 링크 참조 https://docs.oracle.com/javase/8/docs/api/java/security/SecureRandom.html SecureRandom (Java Platform SE 8 ) This class provides a cryptographically strong random number generator (RNG). A cryptographically strong ra.. 2023. 11. 20. [Git] Another git process seems to be running in this repository : 에러해결 현상 commit 을 하려던 중 잘되던 git이 해당 에러를 내뱉었다. Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue. 해결 문제가 생긴 .git 폴더에가서 index.lock 파일 삭제함 커맨드로 진행하는 경우 해당 git 경로로 들어가서 rm -f ./.git/.. 2023. 8. 11. PSQLException: The column index is out of range: 5, number of columns: 4 에러 해결 현상 PSQLException: The column index is out of range: 5, number of columns: 4 해결 postgre sql 쿼리문에 offset이랑 limit을 추가했는데 이런 에러가 발생해서 끙끙대다가 쿼리문 중 주석처리한걸 삭제했더니 해결됨 2023. 7. 28. 인텔리제이에서 Git Branch 생성(브랜치 생성) IntelliJ 에서 git을 연동한 후, 각자의 작업내역은 별도 브랜치를 따서 올려야 할 때 브랜치 생성하는 법이다. 1. 인텔리제이 상단 메뉴에서 Git을 선택 -> New Branch 클릭 2. 새로운 브랜치명을 입력하고 create버튼 클릭 참고로 나는 feature폴더 하위에 csh폴더 하위에 test라는 브랜치를 생성할 것이다. 3. 생성버튼을 누른 후 Local에 보면 내가 만들고자 한 test branch가 잘 생성돼있음이 확인된다. 4. 이후 원격쪽에도 해당 branch를 생성하고 싶으면 Push를 눌러서 원격 쪽으로 push 해주면 끝 그럼 Remote(원격)에 feature/csh/test 브랜치가 생성되있음이 확인 가능하다. 2023. 7. 28. 자바스크립트 객체(JavaScript Objects) 실생활 객체, 속성 및 메소드(Real Life Objects, Properties, and Methods) 실생활에서, 차는 객체이다. 차는 무게, 색깔 그리고 출발과 멈춤같은 방법(메소드)의 속성들을 갖고 있다. 객체 속성 방법(메소드) car.name = Fiat car.model = 500 car.weight = 850kg car.color = white car.start() car.drive() car.brake() car.stop() 모든 자동차는 동일한 속성을 갖고 있지만, 속성 값은 자동차마다 다르다. 모든 자동차는 동일한 방법을 갖고있지만, 서로 다른 시간에 실행된다. 자바스크립트 객체(JavaScript Objects) 자바스크립트 변수는 데이터 값을 담기 위한 컨테이너라고 이미 배웠었.. 2022. 11. 10. 이전 1 2 3 4 5 6 7 8 9 다음