1. Notes on the three layer of the Java EE:
Presentation layer: @Controller Business layer:
@Service Persistence layer:
@Repository Other:
@Component
Note the effect requires several parties:
1. Need an annotation
2. Where to paste directly
3. The third scanning procedure.
Steps:
1. Turn on the annotation scan <context:component-scan base-package= "Com._520it.springmvc.hello"/> Where to scan, this is to scan a package (if all the scan how to match)
2. Paste the corresponding annotation @controller annotation on the corresponding class.
3. Start the error, you need to import AOP-related packages.
Summary:
Configure the scan in the configuration file:
<context:component-scan base-package= "xxx"/>
Using the full annotation method, the foreground pass parameters will be automatically encapsulated in the background write parameters, do not need to manually get
To guide an AOP package
Full annotation mode configuration Springmvc