@@ -0,0 +1,2746 @@
+/*%0A * Licensed to the Indoqa Software Design und Beratung GmbH (Indoqa) under%0A * one or more contributor license agreements. See the NOTICE file distributed%0A * with this work for additional information regarding copyright ownership.%0A * Indoqa licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.indoqa.boot.jsapp;%0A%0Aimport static com.indoqa.boot.jsapp.WebpackAssetsUtils.findWebpackAssetsInClasspath;%0Aimport static com.indoqa.boot.jsapp.WebpackAssetsUtils.findWebpackAssetsInFilesystem;%0Aimport static spark.Spark.externalStaticFileLocation;%0Aimport static spark.Spark.staticFileLocation;%0A%0Aimport java.util.Arrays;%0A%0Aimport javax.annotation.PostConstruct;%0Aimport javax.inject.Inject;%0A%0Aimport org.springframework.core.env.Environment;%0A%0Apublic class AbstractReactFrontendResource extends AbstractJsAppResourcesBase %7B%0A%0A    private static final String DEV_PROFILE = %22dev%22;%0A%0A    @Inject%0A    private Environment environment;%0A%0A    private String mountPath;%0A    private String classPathLocation;%0A    private String fileSystemLocation;%0A%0A    public AbstractReactFrontendResource(String mountPath, String classPathLocation, String fileSystemLocation) %7B%0A        this.mountPath = mountPath;%0A        this.classPathLocation = classPathLocation;%0A        this.fileSystemLocation = fileSystemLocation;%0A    %7D%0A%0A    @PostConstruct%0A    public void mount() %7B%0A        if (this.isDev()) %7B%0A            this.mountFrontendFromFilesystem();%0A        %7D else %7B%0A            this.mountFrontendFromClasspath();%0A        %7D%0A    %7D%0A%0A    protected ProxyURLMappings getProxyURLMappings() %7B%0A        return new ProxyURLMappings();%0A    %7D%0A%0A    private boolean isDev() %7B%0A        return Arrays.stream(this.environment.getActiveProfiles()).anyMatch(profile -%3E profile.equals(DEV_PROFILE));%0A    %7D%0A%0A    private void mountFrontendFromClasspath() %7B%0A        staticFileLocation(this.classPathLocation);%0A%0A        this.jsApp(this.mountPath, findWebpackAssetsInClasspath(this.classPathLocation), this.getProxyURLMappings());%0A%0A    %7D%0A%0A    private void mountFrontendFromFilesystem() %7B%0A        externalStaticFileLocation(this.fileSystemLocation);%0A%0A        this.jsApp(this.mountPath, findWebpackAssetsInFilesystem(this.fileSystemLocation), this.getProxyURLMappings());%0A    %7D%0A%0A%7D%0A

introduce AbstractReactFrontendResource.java