A sample project to demonstrate the capabilities of the Spring Framework and Spring Boot. This project will also act as the basis of upcoming coming labs covering areas such as Spring Data and Spring REST.
- Spring Boot eshop sample project (org.acme:eshop:2018.1.0.SNAPSHOT).
- Define domain model (User, Order, OrderItem, Category, Product).
- Define Service Layer (Interfaces).
- Define Repository (Interfaces and dummy implementation).
- Define Service Layer (Implementation).
- Declare DI.
- Check Qualifier vs Primary.
- Load Services with specific order (@see https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/annotation/Order.html), prefer using @DependsOn.
- Test conditional loading using ConditionalOnClass, ConditionalOnMissingClass, @ConditionalOnProperty, ConditionalOnExpression.
- Create a custom bean in prototype scope.
- Create a custom bean in singleton scope.
- Externalize part of the application to properties(i.e. sequence initial values).
- Load data to repositories (i.e. create bootstrap profile).
- Specific logging level to service and repository layers.
- Configure specific log appender and rotation policy.
- Schedule methods to create entities of a given type and one method to retrieve them (i.e. create schedule profile).
- Async sample implementation.
- Introduce Spring Data JPA and H2.
- Annotate accordingly entities and define database schema.
- Define relations among entities.
- Introduce new repository layer substituting existing.
- Load sample data.
- Expose functionality as Rest Services.
- Utilize RestTemplate to call public APis.
- Add Swagger support.
- Create a universal structure format for both answers and exceptions.
- Define specific locales, enable header locale resolver and enable resource bundles.
- Select specific controller methods, add a second version of these and then add filtering.
- Add cache support.
- Select one domain entity and introduce cache to respective methods.
- Introduce conditional caching to one method.
- Add reporting capabilities. In more details, we need to create a RESTful endpoint returning an Excel file containing the list of submitted orders with respective number of order items and total cost.
- List of patterns complete list can be found here with capabilities of filtering/grouping patterns.
- Another list of design patterns can be found here.
- Actual implementations in Java can be found here.