package com.elorating.config;

import com.elorating.service.PlayerStatsService;
import com.elorating.service.PlayerStatsServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by pokor on 10.06.2017.
 */
@Configuration
public class AppConfig {

    @Bean(name = "playerStatsService")
    public PlayerStatsService getPlayerStatsService() {
        return new PlayerStatsServiceImpl();
    }
}

@@ -126,16 +126,156 @@
 ceImpl;%0A
+import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;%0Aimport org.springframework.boot.web.servlet.ErrorPage;%0A
 import o
@@ -318,16 +318,16 @@
 n.Bean;%0A
-
 import o
@@ -378,16 +378,60 @@
 uration;
+%0Aimport org.springframework.http.HttpStatus;
 %0A%0A/**%0A *
@@ -603,16 +603,16 @@
 ice() %7B%0A
-
         
@@ -653,11 +653,330 @@
 );%0A    %7D
+%0A%0A    /**%0A     * Bean for handling single page application that always redirect to /%0A     * @return error page which redirect to /%0A     */%0A    @Bean%0A    public EmbeddedServletContainerCustomizer pageNotFoundHandler() %7B%0A        return container -%3E container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, %22/%22));%0A    %7D
 %0A%7D%0A

Add 404 handler for SPA routing