Examples:
- SPA: Single Page Application
- DispatcherServlet: Entry point into the application
- Controller: Command Pattern Handler
- RequestMapping: URL and Request Type
- ViewResolver: Locates View to serve
- Servlet-config: Configuration file (Can also be done using java configuration)
- POJO: Plain Old Java Object
- Bean: Spring configured POJO
- pom.xml (dependencies)
- Config (XML or Java)
- Java (Controller, Model, Configuration etc.)
- View
- Presentation Layer
- Business Logic
- Data Layer
- Controller
- Service
- Repository
The Application class extends SpringBootServletInitializer which tells the application server to create a DispatcherServlet.
The @SpringBootApplication annotation contains:
- @EnableAutoConfiguration
- @ComponentScan
- @Configuration
Because of the @Component scan the application will pick up on our controllers annotated with @Controller.
- Logging
- Security
- I18N
- Performance Monitoring
Dependency:
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
@RestController: The heart of rest-services
Examples: