瀏覽代碼

new changes

Xcuello 5 年之前
父節點
當前提交
1460b7537e

+ 5
- 0
src/main/java/com/zipcodewilmington/bakery/Models/Baker.java 查看文件

1
 package com.zipcodewilmington.bakery.Models;
1
 package com.zipcodewilmington.bakery.Models;
2
 
2
 
3
+import com.zipcodewilmington.bakery.Repositories.BakerRepository;
4
+import org.springframework.beans.factory.annotation.Autowired;
3
 import org.springframework.data.annotation.Id;
5
 import org.springframework.data.annotation.Id;
4
 import javax.persistence.Entity;
6
 import javax.persistence.Entity;
5
 import javax.persistence.GeneratedValue;
7
 import javax.persistence.GeneratedValue;
8
 @Entity
10
 @Entity
9
 public class Baker {
11
 public class Baker {
10
 
12
 
13
+    @Autowired
14
+    BakerRepository bakerRepository;
15
+
11
     @Id
16
     @Id
12
     @GeneratedValue(strategy = GenerationType.AUTO)
17
     @GeneratedValue(strategy = GenerationType.AUTO)
13
     private Long id;
18
     private Long id;

+ 5
- 0
src/main/java/com/zipcodewilmington/bakery/Models/Muffin.java 查看文件

1
 package com.zipcodewilmington.bakery.Models;
1
 package com.zipcodewilmington.bakery.Models;
2
 
2
 
3
+import com.zipcodewilmington.bakery.Repositories.MuffinRepository;
4
+import org.springframework.beans.factory.annotation.Autowired;
3
 import org.springframework.data.annotation.Id;
5
 import org.springframework.data.annotation.Id;
4
 import javax.persistence.Entity;
6
 import javax.persistence.Entity;
5
 import javax.persistence.GeneratedValue;
7
 import javax.persistence.GeneratedValue;
8
 @Entity
10
 @Entity
9
 public class Muffin {
11
 public class Muffin {
10
 
12
 
13
+    @Autowired
14
+    MuffinRepository muffinRepository;
15
+
11
     @Id
16
     @Id
12
     @GeneratedValue(strategy = GenerationType.AUTO)
17
     @GeneratedValue(strategy = GenerationType.AUTO)
13
     private Long id;
18
     private Long id;