Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Employee class needs default constructor #67

Closed
ocarlsen opened this issue Dec 5, 2018 · 3 comments
Closed

Employee class needs default constructor #67

ocarlsen opened this issue Dec 5, 2018 · 3 comments

Comments

@ocarlsen
Copy link

ocarlsen commented Dec 5, 2018

Employee class needs default constructor for JPA. Otherwise you will get an org.hibernate.InstantiationException: No default constructor for entity exception at the step to curl -v localhost:8080/employees.

@Lance-Drane
Copy link

Lance-Drane commented Dec 22, 2018

This annotation should be added to Employee.java (and a similar one for Order.java):

@NoArgsConstructor(access = AccessLevel.PRIVATE)

@Allianzcortex
Copy link

@gregturn @joshlong Please merge this fix ASAP !!😭😭 I nearly waste my whole night. I generate the spring boot based on the instruction but find it cannot work, while the source code I download can provide the function. After debugging all night I find that it is the version issue. For

<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.1.RELEASE</version>
	</parent>

Only 2.1.1 can't work.Other version(even 2.1.0) can work well.

image

@gregturn
Copy link
Contributor

Resolved via #77.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants