Skip to content

Instantly share code, notes, and snippets.

@Abhi-Codes
Created November 6, 2022 04:52
Show Gist options
  • Save Abhi-Codes/e0dd8f1c216b87afd485d3f289d02c4d to your computer and use it in GitHub Desktop.
Save Abhi-Codes/e0dd8f1c216b87afd485d3f289d02c4d to your computer and use it in GitHub Desktop.
Create custom layers in spring Boot
<layers xmlns="http://www.springframework.org/schema/boot/layers" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
https://www.springframework.org/schema/boot/layers/layers-2.7.xsd">
<application>
<into layer="spring-boot-loader">
<include>org/springframework/boot/loader/**</include>
</into>
<into layer="application" />
</application>
<dependencies>
<into layer="snapshot-dependencies">
<include>*:*:*SNAPSHOT</include>
</into>
<into layer="custom-dependencies">
<include>com.company:*</include>
</into>
<into layer="dependencies" />
</dependencies>
<layerOrder>
<layer>dependencies</layer>
<layer>spring-boot-loader</layer>
<layer>snapshot-dependencies</layer>
<layer>custom-dependencies</layer>
<layer>application</layer>
</layerOrder>
</layers>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment