Java MVC Frameworks course at SoftUni - Feb 2019
Simple Spring Boot application using Spring Data.
- Customized MySQL dialect - changed default charset and collation
- Optimized UUID primary keys representation in database - use BINARY(16) type instead of VARCHAR(36)
Simple Spring Boot application, custom security, MD to PDF conversion and file download, Thymeleaf templating and fragments.
- Password hashing with Jargon2
- Thymeleaf templating and fragments
- Simple security by custom class/method annotation and interceptor
- Convert MD to PDF format with Markdown2Pdf
- PDF file download
- Custom @Layot annotation and Interceptor for templating and fragments insert
- Implemented Builder Pattern for AuthenticatedInterceptor and ThymeleafLayoutInterceptor
- Composite annotations for entity/model validation
- Use of transactions (read/write) for all public service methods to promote data integrity and as optimization for methods that make multiple DB calls (ex. User registration)
- Use @SessionAttributes for store and reuse of @ModelAttribute by Controller, avoiding unnecessary Service/Repository calls for getting the same data
- Use caching on selected service methods (@EnableCaching + @CacheConfig + @Cacheable / @CacheEvict)
Task is to write unit tests for CRUD-like services with effectively no service logic in the given skeleton, so tests are based on 100% mocking of service dependencies and evaluation of method calls, argument and return values.
- Mocking
Task is to create a 5-page Spring Boot application with input forms, using Thymeleaf.
Project structure is similar to the one used in EXODIA, but greatly extended and improved by applying best practices and new techniques:
- Base Entity class equals and hashCode methods implemented as recommended by Vlad Mihalcea
- Custom ENUM mapping in entities by converters
- Custom HQL queries with direct mapping to view models to avoid unnecessary data pooling
- Simplified controllers by moving of common logic to parent classes and using of Spring's goodies like @SessionAttributes
- Use of converters for mapping of custom types between Spring controllers and Thymeleaf
- Use text messages from external messages.properties file
- Use validation messages from external validation.properties file
- Define validation constraints as constants into composite validation annotations and use these for setting up entities columns, ensuring integrity between actual validation and DB constraints.
- Trim string values from input forms with @InitBinder and StringTrimmerEditor. Further customize this functionality to prevent trimming of certain fields like "password" or treating empty texts as null, by protected methods allowing redefinition of the rules by child classes.
- Use Javadoc whenever it is appropriate to (config files, protected methods, base classes, interfaces etc.)
- Responce compression and static resources caching enabled
- Generic repository - provides generic methods for work with projections
Task is to extend Project: Resident Evil - Part I by adding asynchronous requests with JavaScript and AJAX.
Build over a copy of Project: Resident Evil Part I
Task is to extend Project: Resident Evil - Part II by implementing Spring Security.
Build over a copy of Project: Resident Evil Part I && II:
- Spring Security configuration
- GrantedAuthority implementation
- UserDetails implementation, lazy authorities initialization thanks to a named query
- UserDetailsService implementation
- Remember Me functionality
- CSRF with Thymeleaf and AJAX requests
Task is to write Web layer Integration tests of the given application.
- Spring MVC mock
- H2 in-memory database use
- REST API test