import javax.annotation.Resource;

public class Circle implements Shape {

    private Point center;

    @Resource(name = "pointC")
    public void setCenter(Point center) {
        this.center = center;
    }

    @Override
    public void draw() {
        System.out.println(this);
    }

    @Override
    public String toString() {
        return "Circle{" +
                "center=" + center +
                '}';
    }
}

@@ -1,8 +1,83 @@
+import javax.annotation.PostConstruct;%0Aimport javax.annotation.PreDestroy;%0A
 import j
@@ -352,32 +352,237 @@
 n(this);%0A    %7D%0A%0A
+    @PostConstruct%0A    public void afterInit() %7B%0A        System.out.println(%22init circle%22);%0A    %7D%0A%0A    @PreDestroy%0A    public void beforeDestroy() %7B%0A        System.out.println(%22destroying circle%22);%0A    %7D%0A%0A
     @Override%0A  

use PostConstruct and PreDestroy JSR 250 annotation in place of init-method and destroy-method xml config