package cn.edu.tju.controller;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
@RestController
//@Scope("prototype")
public class TestController {
@PreDestroy
public void myPreDestroy(){
System.out.println(" my pre destroy......");
}
@PostConstruct
public void myPostConstruct(){
System.out.println("my post construct......");
}
@RequestMapping("/getInfo")
public String getInfo(){
System.out.println(this);
return "hello, world!";
}
}