标签 annotation 下的文章

演员演出需要记录每个演员的演出次数

1. Performance接口和Actor类

package aop;

/**
 * Created by guoli on 2017/7/28 0028.
 * YXV0aG9yOiB6aGFuZ2d1b2xpLmNu
 */
public interface Performance {

    /**
     * @param number 演员编号
     */
    public void playTrack(String number);
}
package aop;

import org.springframework.stereotype.Component;

/**
 * Created by guoli on 2017/7/28 0028.
 * YXV0aG9yOiB6aGFuZ2d1b2xpLmNu
 */
@Component
public class Actor implements Performance {

    @Override
    public void playTrack(String number) {
        System.out.println(number + " number actor");
    }
}

- 阅读剩余部分 -