/*
 * Copyright 2016 EPAM Systems
 * 
 * 
 * This file is part of EPAM Report Portal.
 * https://github.com/epam/ReportPortal
 * 
 * Report Portal is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Report Portal is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Report Portal.  If not, see <http://www.gnu.org/licenses/>.
 */ 
/*
 * This file is part of Report Portal.
 *
 * Report Portal is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Report Portal is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Report Portal.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.epam.reportportal.ui;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.web.servlet.ErrorPage;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Gateway Application
 *
 * @author Andrei Varabyeu
 */
@SpringBootApplication
@EnableEurekaClient
public class UIApp extends WebMvcConfigurerAdapter {

	public static void main(String[] args) throws Exception {
		SpringApplication.run(UIApp.class, args);
	}

	@Component
	public class WebConfiguration implements EmbeddedServletContainerCustomizer {
		@Override
		public void customize(ConfigurableEmbeddedServletContainer configurableEmbeddedServletContainer) {
			configurableEmbeddedServletContainer.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/404.html"));
		}
	}

}

@@ -2037,24 +2037,106 @@
 .Component;%0A
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;%0A
 import org.s
@@ -2471,16 +2471,402 @@
 s);%0A%09%7D%0A%0A
+%09@Override%0A%09public void addResourceHandlers(ResourceHandlerRegistry registry) %7B%0A%09%09if (!registry.hasMappingForPattern(%22/webjars/**%22)) %7B%0A%09%09%09registry.addResourceHandler(%22/webjars/**%22).addResourceLocations(%22classpath:/META-INF/resources/webjars/%22);%0A%09%09%7D%0A%09%09if (!registry.hasMappingForPattern(%22/**%22)) %7B%0A%09%09%09registry.addResourceHandler(%22/**%22).addResourceLocations(%22classpath:/public/%22);%0A%09%09%7D%0A%09%7D%0A%0A
 %09@Compon

fix order of resources