刘思晗 2 days ago
commit 8a6d7a5fc5

@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class FirstController {
@RequestMapping("hello")
@RequestMapping(" hello ")
public String hello() {
return "showFirst";
}

@ -12,7 +12,7 @@ public class Exam {
public String getTime() {return time;}
public void setTime(String time) {this.time = time;}
public void show(){
public void printInfo(){
System.out.println("考试id"+eid);
System.out.println("考试名称:"+ename);
System.out.println("考试时间:"+time);

@ -28,4 +28,10 @@ public class Log {
System.out.println("【前置通知】执行时间 " + new Date());
System.out.println("==================================");
}
public void before(JoinPoint joinPoint, Exam exam) {
System.out.println("==================================");
System.out.println("【前置通知】开始执行的方法 " + joinPoint.getSignature().getName() );
System.out.println("【前置通知】执行时间 " + new Date());
System.out.println("==================================");
}
}

@ -12,6 +12,8 @@ public class Test {
course.printInfo();
Score score = (Score) ac.getBean("score");
score.printInfo();
Exam exam = (Exam) ac.getBean("exam");
exam.printInfo();

Loading…
Cancel
Save