/*
 * Copyright 2014-2016 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.dbflute.intro.mylasta.direction.sponsor;

import org.dbflute.util.DfStringUtil;
import org.lastaflute.web.path.ActionAdjustmentProvider;

/**
 * @author p1us2er0
 * @author jflute
 */
public class IntroActionAdjustmentProvider implements ActionAdjustmentProvider {

    @Override
    public String customizeActionMappingRequestPath(String requestPath) {
        // Action class name does not need 'Api' prefix
        // ('api' is to be separated from angular request)
        return DfStringUtil.substringFirstRear(requestPath, "/api");
    }
}

@@ -667,16 +667,63 @@
 onsor;%0A%0A
+import javax.servlet.http.HttpServletRequest;%0A%0A
 import o
@@ -938,16 +938,356 @@
 ider %7B%0A%0A
+    protected static final String API_URL_PREFIX = %22/api%22; // to be separated from angular request%0A%0A    @Override%0A    public boolean isForcedRoutingExcept(HttpServletRequest request, String requestPath) %7B%0A        // of course, request to angular resources does not need routing%0A        return requestPath.startsWith(API_URL_PREFIX);%0A    %7D%0A%0A
     @Ove
@@ -1377,17 +1377,17 @@
      // 
-A
+a
 ction cl
@@ -1426,67 +1426,8 @@
 fix%0A
-        // ('api' is to be separated from angular request)%0A
     
@@ -1482,22 +1482,30 @@
 stPath, 
-%22/api%22
+API_URL_PREFIX
 );%0A    %7D

use isForcedRoutingExcept() for performance