Skip to content

Martin-BG/SoftUni-Java-MVC-Frameworks-Spring-Feb-2019

Repository files navigation

Java MVC Frameworks - Spring

Java MVC Frameworks course at SoftUni - Feb 2019

Projects

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.


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:


Task is to write Web layer Integration tests of the given application.

  • Spring MVC mock
  • H2 in-memory database use
  • REST API test