User service added login and returning token
This commit is contained in:
@ -1,15 +1,36 @@
|
||||
package com.plannaplan;
|
||||
|
||||
import com.plannaplan.entities.User;
|
||||
import com.plannaplan.services.UserService;
|
||||
import com.plannaplan.types.UserRoles;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.event.EventListener;
|
||||
|
||||
@SpringBootApplication
|
||||
public class App {
|
||||
|
||||
@Autowired
|
||||
UserService userService;
|
||||
|
||||
public static void main(String[] args) {
|
||||
Logo logo = new Logo("beta");
|
||||
System.out.println(logo.getLogo());
|
||||
System.out.println("|=============================================================================================|");
|
||||
System.out.println(
|
||||
"|=============================================================================================|");
|
||||
SpringApplication.run(App.class, args);
|
||||
}
|
||||
|
||||
// @EventListener(ApplicationReadyEvent.class)
|
||||
// public void importData() {
|
||||
// User testUser = new User();
|
||||
// testUser.setEmail("noteexisitingmail@notexistingdomain.com");
|
||||
// testUser.setName("Tom");
|
||||
// testUser.setSurname("Kovalsky");
|
||||
// testUser.setRole(UserRoles.TEST_USER);
|
||||
// this.userService.save(testUser);
|
||||
// }
|
||||
}
|
||||
|
Reference in New Issue
Block a user