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

Add default constructor, remove unnecessary annotation #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
public class SpringBootCourseApplication {

public static void main(String[] args) {

SpringApplication.run(SpringBootCourseApplication.class, args);

}
}
21 changes: 12 additions & 9 deletions src/main/java/com/yourname/demo/model/Student.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
public class Student {

private UUID id;
private final Integer age;
private final String firstName;
private final String lastName;
private final String course;
private Integer age;
private String firstName;
private String lastName;
private String course;

public Student(){
}

public Student(
@JsonProperty("id") UUID id,
@JsonProperty("age") Integer age,
@JsonProperty("firstName") String firstName,
@JsonProperty("lastName") String lastName,
@JsonProperty("course") String course) {
UUID id,
Integer age,
String firstName,
String lastName,
String course) {
this.id = id;
this.age = age;
this.firstName = firstName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class StudentService {
private final StudentDao studentDao;

@Autowired
public StudentService(@Qualifier("mongoDbDao") StudentDao studentDao) {
public StudentService(@Qualifier("fakeDao") StudentDao studentDao) {
this.studentDao = studentDao;
}

Expand Down