17.2. Spring Microservices Plugin

The 'Spring Microservices' plugin for Java exposes web resources of SpringBoot applications and dependencies between them. It finds exposed web service end points by looking at annotations like org.springframework.web.bind.annotation.RequestMapping. If a method is annotated with one of those annotations the web resource will be added as a child to the method in the Navigation view.

Currently, clients using the Spring FeignClient annotations are detected as 'Web Call' elements. More client frameworks will be added in the future. For each of those methods, a 'Web Call' child element is created, and a corresponding 'Web Resource' element is tried to be found in the workspace. The web resources could have been created by another plugin. If no matching 'Web Resource' is found, an 'External Web Resource' element is created as child element of the plugin's external node.

SpringBoot offers various ways of configuration. The plugin currently expects a standard directory layout for SpringBoot modules, with configuration files (application.properties, application.yml, bootstrap.properties, bootstrap.yml) contained in the module's 'src/main/resources/' directory. It can also analyze configuration files contained in SpringBoot applications annotated with org.springframework.cloud.config.server.EnableConfigServer. Currently, configuration loaded from classpath is supported (spring.cloud.config.server.native.search-locations = classpath:/shared).

Please contact us if you have a use case and need some support!

The following screenshots have been created for the Piggy Metrics application.

Spring Microservices Plugin Web Call (above) and Web Resource (below)
Figure 17.1. Spring Microservices Plugin Web Call (above) and Web Resource (below)


Dependencies between web calls and web resources are treated like any other dependency and can cause architecture violations.

Architecture Violations for Dependencies between Plugin Elements
Figure 17.2. Architecture Violations for Dependencies between Plugin Elements


Related topics: