-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaven.txt
17 lines (11 loc) · 1.08 KB
/
maven.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mvn archetype:generate -DgroupId=br.com.splessons -DartifactId=lesson1 -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
mvn archetype:generate -DgroupId=br.com.splessons -DartifactId=lesson5 -DarchetypeArtifactId=maven-archetype-webapp -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
mvn eclipse:eclipse
Below are commonly used Spring annotation which makes a bean auto-detectable:
@Repository - Used to mark a bean as DAO Component on persistence layer
@Service - Used to mark a bean as Service Component on business layer
@Controller - Used to mark a bean as Controller Component on Presentation layer
@Configuration - Used to mark a bean as Configuration Component.
@Component - General purpose annotation, can be used as a replacement for above annotations.
@RestController - Used to mark a bean as Rest Controller Component
Note that all above mentioned annotations are internally annotated with @Component, so indeed you can use @Component everywhere, but to keep the design & intention clean, it’s advisable to use different annotation based on different condition.