목록전체 글 (22)
슬픈강낭콩
보호되어 있는 글입니다.

인텔리제이에서 자바코드를 먼저만들고 Create Git Repository.로 깃허브에 자동으로 레파지토리를 만들려고하는데 오류가 생겼다 아래사진처럼 원래2개가있었는데 하나를 삭제하고 한개만 내두니까 잘 된다.
https://suyeoniii.tistory.com/99 [Spring Boot] 오류: Cannot construct instance of (no Creators, like default constructor, exist): cannot deserialize from Objec 정말 오랜만에 작년에 진행했던 프로젝트의 서버를 다시 살려보았다. 겨우 살리는데는 성공을 했는데, API호출을 해보니 500에러가 난다!ㅠㅠ 🚨 에러메세지 Cannot construct instance of `model` (no Creator suyeoniii.tistory.com 생성자를 없애니까 잘 실행된다. 500에러가 났는데 흠.. public User(String id, String password) { this.id..

원래는 arraylist로 객체를 받아서 넘겨 주었다. 근데 문제가 화면을 보여줄때 아래처럼 보여준다. 이것을 보기 쉽게 하고싶어서 json으로 전달해주기로 했다. 새로운 dependencies를 추가하고 사용한다. implementation 'com.googlecode.json-simple:json-simple:1.1.1' 를 추가해주고 만든리스트를 JSONObject obj = new JSONObject(); obj.put("item", allcoreList); 넣어줬는데 이렇게 아이템 하나로 나왔다. 가공을 해서 넘겨줘야 할것같다. 아래처럼 해주니 잘 나온다. JSONArray Arrayaobj = new JSONArray(); for (int i=0; i < allcoreList.size(); i..
Error creating bean with name 오류가 또 발생했따 근데 쿼리문을 써주니 없어졌다. @Query("select u from Plant u where u.core_name like :core_name%") Plant findByCore_nameLike(String core_name); 참고 https://recordsoflife.tistory.com/59 Spring Data JPA LIKE Query 예제 Spring Data JPA LIKE Query 예제 1. 소개 이 빠른 자습서에서는 Spring JPA 저장소 에서 LIKE 쿼리를 작성하는 다양한 방법을 다룰 것 입니다. 쿼리 방법을 만드는 동안 사용할 수있는 다양한 키워드를 살펴 recordsoflife.tistory.com..
java.lang.IllegalArgumentException: The given id must not be null 오류가 생겼다. 아마 Repository 에서 findbyid를 하는데 보내는 ID가 NULL인것 같다. get으로 찍어보니 null이 들어있다. 알고보니 첫번째 자리만 구하고 메인과 서브자리를 구하지 않았던것이다. 그래서 for문 밖에서 따로 한번 함수를 호출해서 메인과 서브자리를 구해야한다. 우선 오타가 있었다 main_core 인데 mian_core라고 써서 오타가 있어서 그거 해결했고 또 다른 오류가있다.. Unknown column 'cs_title' in 'field list' 오류다 성공했따................ private String main_core; 이게 오타..
상황은 해당 테이블에 id와 core_name 둘다 pk로 선언되어있고 ID를 core_id로 allCoreRepository.findById(allcore.getCore_name()); 를 전송했다. ID로 매칭을 해서그런가 Repository 로 만들때는 String타입으로 전송해서 잘 될줄 알았다. 근데 @id값을 String으로 바꾸니까 해결되었다. public interface AllCoreRepository extends JpaRepository { } @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int core_id; private String core_name; @Id @GeneratedValue(strategy = Ge..
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Provided id of the wrong type for class com.exam.mix.entity.Allcore. Expected: class java.lang.Integer, got class java.lang.String; nested exception is java.lang.IllegalArgumentException: Provided id ..