some changes
This commit is contained in:
parent
08b7192527
commit
632ca2783c
@ -13,18 +13,18 @@ public class Recipe {
|
||||
private String Name;
|
||||
private String Description;
|
||||
private String Ingredients;
|
||||
private LocalDateTime CreatedTimestamp;
|
||||
private LocalDateTime CreatedTimestamp = LocalDateTime.now();
|
||||
|
||||
// constructors
|
||||
public Recipe() {
|
||||
|
||||
}
|
||||
|
||||
public Recipe(String name, String description, String ingredients, LocalDateTime createdTimestamp) {
|
||||
public Recipe(String name, String description, String ingredients) {
|
||||
this.Name = name;
|
||||
this.Description = description;
|
||||
this.Ingredients = ingredients;
|
||||
this.CreatedTimestamp = createdTimestamp;
|
||||
this.CreatedTimestamp = LocalDateTime.now();
|
||||
}
|
||||
|
||||
// mehtods (fields)
|
||||
|
@ -18,7 +18,7 @@ class LoadDatabase {
|
||||
@Bean
|
||||
CommandLineRunner initDatabase(RecipeRepository repository) {
|
||||
return args -> {
|
||||
log.info("Preloading " + repository.save(new Recipe("Peanut Butter and Jelly Sandwhich", "The defacto sandwhich", "Peanut Butter, Jelly, and bread", LocalDateTime.now())));
|
||||
log.info("Preloading " + repository.save(new Recipe("Peanut Butter and Jelly Sandwhich", "The defacto sandwhich", "Peanut Butter, Jelly, and bread")));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user