|
|
@@ -0,0 +1,22 @@
|
|
|
+package com.deliveryproject.easydelivery;
|
|
|
+
|
|
|
+import com.deliveryproject.easydelivery.Models.AppUser;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import javax.annotation.PostConstruct;
|
|
|
+
|
|
|
+@Component
|
|
|
+public class PostConstructInit {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ AppUserController appUserController;
|
|
|
+
|
|
|
+ @PostConstruct
|
|
|
+ public void init(){
|
|
|
+ AppUser appUser = new AppUser();
|
|
|
+ appUser.setName("user2");
|
|
|
+ appUserController.createUser(appUser);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|