CJSCommonPlatform / microservice_framework_version_6

A Java framework to support applications utilising CQRS and Event Sourcing architectures
Other
23 stars 33 forks source link

messaging-adapter-core and rest-adapter-core should depend on api not on core #425

Open jaceko opened 7 years ago

jaceko commented 7 years ago

Currently messaging-adapter-core and rest-adapter-core depend on the implementation module (core) rather than api. We shuld break this dependency and depend on api. The prerequisite for this task is: https://github.com/CJSCommonPlatform/microservice_framework/issues/407

artur-synowiec commented 6 years ago

I doesn't seem as simple as removing core dependencies and adding framework-api-core in the two modules. The following classes will become broken: JsonSchemaValidationInterceptor.java JsonValidationLoggerHelper.java DefaultJmsProcessor.java

After a discussion we've come to the following steps to achieve this:

  1. uk.gov.justice.services.adapter.messaging.DefaultJmsProcessor - use SPI approach (using static method in interface) - will be done as a start in a separate pull request.

  2. uk.gov.justice.services.core.mapping.NameToMediaTypeConverter - make an interface in API and implement in core (keeping same packaging)

  3. Create a custom Exception in API replacing ValidationException used in JsonSchemaValidationInterceptor and JsonValidationLoggerHelper