error 4

Error : No default constructor for entity

SpringBoot에서 JPA를 이용해 MySQL의 정보를 받아오는 작업을 하는 중이었습니다. org.hibernate.InstantiationException: No default constructor for entity MySQL에서 받아올 정보가 없는 경우 아무런 문제가 없었지만 받아올 정보가 있는 경우 위의 에러가 발생하였습니다. 해결방법 제가 해결한 방법은 Entity에 기본 생성자를 만들어주었습니다. 예를 들어, MySQL에서 Book 객체를 받아온다고 가정했을 때 해당 클래스의 기본 생성자를 만들어 주었습니다. @NoArgsConstructor Entity에 위 어노테이션을 붙여도 해결된다는 글을 봤지만 저는 이 방법으로는 해결되지 않았습니다. 추가적인 공부가 필요해 보입니다. Referen..

Backend/Spring 2021.07.11

Error : Component template should contain exactly one root element.

Vue Component를 js파일로 따로 만드는 작업을 하고 있었습니다. export default { template: `사원목록 검색 아이디 사원명 부서 {{emp.id}} {{emp.name}} {{emp.dept}} `, data() { return { emps : [], name : '', } }, methods: { search() { this.name = this.$refs.name.value; }, }, mounted() { this.emps = JSON.parse(localStorage.getItem('emp')); }, }; 그런데 이 js 파일을 import 하여 사용하던 도중 에러가 발생하였습니다. Component template should contain exactly one ..

Frontend/Vue 2021.05.13