@@ -0,0 +1,579 @@
+package org.geoshell;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Component;%0A%0Aimport javax.annotation.PostConstruct;%0Aimport javax.annotation.PreDestroy;%0A%0A@Component%0Apublic class Lifecycle %7B%0A%0A    @Autowired%0A    Catalog catalog;%0A%0A    @PostConstruct%0A    public void setup() %7B%0A        System.setProperty(%22org.geotools.referencing.forceXY%22, %22true%22);%0A    %7D%0A%0A    @PreDestroy%0A    public void teardown() %7B%0A        try %7B%0A            catalog.destroy();%0A        %7D catch (Exception ex) %7B%0A            // We tried...%0A        %7D%0A    %7D%0A%0A%7D%0A

Add Lifecycle class with startup and teardown methods to configure geotools and close resources