Changeset 29c0ed0 for src/main/java/it/finki/tinki/bootstrap
- Timestamp:
- 01/04/21 19:20:57 (4 years ago)
- Branches:
- master
- Children:
- 83a5af4
- Parents:
- efdb71a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/bootstrap/DataHolder.java
refdb71a r29c0ed0 1 1 package it.finki.tinki.bootstrap; 2 2 3 import it.finki.tinki.model.Address; 3 4 import it.finki.tinki.model.Skill; 4 import it.finki.tinki.repository.SkillRepository; 5 import it.finki.tinki.model.Users.Company; 6 import it.finki.tinki.model.Users.User; 7 import it.finki.tinki.model.enumerator.AccountType; 8 import it.finki.tinki.repository.*; 5 9 import org.springframework.stereotype.Component; 6 10 7 11 import javax.annotation.PostConstruct; 12 import java.util.ArrayList; 13 import java.util.List; 8 14 9 15 @Component … … 11 17 12 18 SkillRepository skillRepository; 19 UserRepository userRepository; 20 CompanyRepository companyRepository; 21 TeamRepository teamRepository; 22 AddressRepository addressRepository; 13 23 14 public DataHolder(SkillRepository skillRepository ) {24 public DataHolder(SkillRepository skillRepository, UserRepository userRepository, CompanyRepository companyRepository, TeamRepository teamRepository, AddressRepository addressRepository) { 15 25 this.skillRepository = skillRepository; 26 this.userRepository = userRepository; 27 this.companyRepository = companyRepository; 28 this.teamRepository = teamRepository; 29 this.addressRepository = addressRepository; 16 30 } 17 31 … … 41 55 skillRepository.save(s0); 42 56 } 57 58 addressRepository.save(new Address("asdf", "asdf", "asdf")); 59 companyRepository.save(new Company("asdf@asdf", "pass", "Co.co", AccountType.COMPANY, addressRepository.findAll().get(0))); 43 60 } 44 61
Note:
See TracChangeset
for help on using the changeset viewer.