parent
0850c9f730
commit
ba2f9e2b0c
@ -1,37 +1,14 @@ |
|||||||
package mivan; |
package mivan; |
||||||
|
|
||||||
import java.io.Console; |
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication; |
import org.springframework.boot.SpringApplication; |
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||||
|
|
||||||
import mivan.model.User; |
|
||||||
import mivan.repository.UserRepository; |
|
||||||
import mivan.repository.UserRepositoryImpl; |
|
||||||
|
|
||||||
@SpringBootApplication |
@SpringBootApplication |
||||||
public class Mivan { |
public class Mivan { |
||||||
|
|
||||||
public static void main(String[] args) { |
public static void main(String[] args) { |
||||||
|
|
||||||
String firstName = "Paolo"; |
|
||||||
String lastName = "Verdi"; |
|
||||||
String city = "Milano"; |
|
||||||
String username = "p.verdi1"; |
|
||||||
String email = "p.verdi1@campus.unimib.it"; |
|
||||||
String password = "pverdipassword"; |
|
||||||
|
|
||||||
User user = new User(firstName, lastName, city, username, email, password); |
|
||||||
|
|
||||||
|
|
||||||
UserRepository userRepository = new UserRepositoryImpl(); |
|
||||||
userRepository.addUser(user); |
|
||||||
|
|
||||||
int size = userRepository.getSize(); |
|
||||||
|
|
||||||
System.out.print(size); |
|
||||||
|
|
||||||
SpringApplication.run(Mivan.class, args); |
SpringApplication.run(Mivan.class, args); |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
Loading…
Reference in new issue