Skip to content

Freemarker rendering error

Rod Scott requested to merge eds-2017-rendering-error into develop

Rendering Error

WebConfig line: 312 @PostConstruct on configureFreemarker() is what breaks the circular dependency in bean creation, splitting up the creation of the Freemarker bean from it's configuration, allowing the shared variables to be created first.

This failure to create the Freemarker configuration is what was causing the rendering of html pages to fail.

Other Work

Bean Wiring

Moved most of the bean creation into WebConfig to simplify it, wanted to remove autowiring as was unsure if it was causing problems with ApplicationContext creation. Many config files therefore deleted.

Some services annotated with @Service to automatically create beans. Slowly trying to make more of the services automatically created but need good testing to know things not broken.

Testing

Added ApplicationContextTest to test the creation of all the beans.

Logging

Added logging to service and controller constructors to make visible what beans are created at container startup. Involved swapping @AllArgsConstructor for concrete constructor.

Suppress Warnings

Suppressing compiler warnings for:

  • EventBus - Unstable API Usage, it has been in Beta for years.
  • Generics - Raw Type and Unchecked usage, some hard to fix use of generics suppressed.

throws statements

Removed un-thrown exceptions from method signatures

Library Upgrades

  • CEH components 1.0.44 -> 1.0.46
  • Spring 4.3.17 -> 4.3.29
  • Spring Security 4.2.6 -> 4.2.18
  • Jackson 2.9.0 -> 2.11.3
  • Lombok 1.16.20 -> 1.18.12
  • Gradle 4.8 -> 4.10.2
  • Guava 23 -> 29.0

Spring & Spring Security are the last versions before the upgrades to major version 5.

Gradle last version of 4 before upgrade to 6 via 5

Edited by Rod Scott

Merge request reports

Loading