Demonstrate Bean Lifecycle with PostConstruct

master
sgoudham 4 years ago
parent 84e5e9e363
commit 196ca845c8
No known key found for this signature in database
GPG Key ID: EF51A29A50FB754C

@ -3,6 +3,7 @@ package conference.service;
import conference.model.Speaker;
import conference.repository.SpeakerRepository;
import javax.annotation.PostConstruct;
import java.util.List;
public class SpeakerServiceImpl implements SpeakerService {
@ -13,6 +14,11 @@ public class SpeakerServiceImpl implements SpeakerService {
this.speakerRepository = speakerRepository;
}
@PostConstruct
private void initialise() {
System.out.println("Initialisation After Constructors");
}
public void setSpeakerRepository(SpeakerRepository speakerRepository) {
this.speakerRepository = speakerRepository;
}

Loading…
Cancel
Save