Explain the spring aspect and use the parameters passed to the notified method
This article introduces the parameters passed to the notified method in the spring aspect, and shares them with you. The details are as follows:
Scenario:
Blankdisc represents a CD entity. You can directly play songs in a track through the playtrack () method.
The requirement is to record the number of times each track is played.
One way is to modify the playtrack () method to record this number directly at each call. However, the number of playback times of the recorded track is different from the playback itself, so it should not belong to the playtrack () method. This should be the task to be completed in all aspects.
Compactdisc interface
Implementation class blankdisc
Facet class tracecount
applicationContext. XML configuration file
test
Test results 3, 2, 1, 0
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.