Removed generic examples

This commit is contained in:
Erhan KARAKAYA 2019-02-03 22:47:10 +03:00
parent 5f23e39332
commit 11bce96dc8
3 changed files with 0 additions and 50 deletions

View File

@ -1,38 +0,0 @@
package org.baeldung.sampleabstract;
import org.springframework.beans.factory.annotation.Autowired;
public abstract class AbstractGenericService<T, S> {
@Autowired
private T genericFieldT;
private S genericFieldS;
public T getGenericFieldT() {
return genericFieldT;
}
public void setGenericFieldT(T genericFieldT) {
this.genericFieldT = genericFieldT;
}
public S getGenericFieldS() {
return genericFieldS;
}
@Autowired
public void setGenericFieldS(S genericFieldS) {
this.genericFieldS = genericFieldS;
}
public void afterInitialize() {
System.out.println(genericFieldT.getClass().getSimpleName());
System.out.println(genericFieldS.getClass().getSimpleName());
}
}

View File

@ -15,9 +15,6 @@ public class DemoApp {
@Autowired
private FooService fooService;
@Autowired
private FooGenericService fooGenericService;
public static void main(String[] args) {
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(DemoApp.class);
@ -27,6 +24,5 @@ public class DemoApp {
public void afterInitialize() {
fooService.afterInitialize();
fooGenericService.afterInitialize();
}
}

View File

@ -1,8 +0,0 @@
package org.baeldung.sampleabstract;
import org.springframework.stereotype.Component;
@Component
public class FooGenericService extends AbstractGenericService<FooBean, BarBean> {
}