import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import lombok.NoArgsConstructor;
import org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority;
import org.onap.portalapp.controller.EPRestrictedBaseController;
import org.onap.portalapp.portal.logging.aop.EPAuditLog;
+import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping("/")
-@org.springframework.context.annotation.Configuration
+@Configuration
@EnableAspectJAutoProxy
@EPAuditLog
+@NoArgsConstructor
public class ONAPWelcomeController extends EPRestrictedBaseController{
- String viewName;
-
- @RequestMapping(value = "/index.htm", method = RequestMethod.GET)
+ @GetMapping(value = "/index.htm")
public String getIndexPage(HttpServletRequest request) {
return "/index";
}
- @RequestMapping(value = {"/applicationsHome", "/dashboard", "/widgetsHome", "/kpidash*", "/admins", "/users", "/portalAdmins", "/applications", "/widgets", "/functionalMenu", "/contactUs", "/getAccess","/appCatalog", "/widgetOnboarding", "/accountOnboarding"}, method = RequestMethod.GET)
+ @GetMapping(value = {"/app/*","/applicationsHome", "/dashboard", "/widgetsHome", "/kpidash*", "/admins", "/users", "/portalAdmins", "/applications", "/widgets", "/functionalMenu", "/contactUs", "/getAccess","/appCatalog", "/widgetOnboarding", "/accountOnboarding"})
public String getEcompSinglePage(HttpServletRequest request, HttpServletResponse response) {
return "forward:/index.html";
}
- protected String getViewName() {
- return viewName;
- }
-
- protected void setViewName(String viewName) {
- this.viewName = viewName;
- }
-
// TODO Need to revisit this as its conflicting with Spring Security; check web.xml's oid-context.xml config
//@Resource(name = "namedAdmins")
private Set<SubjectIssuerGrantedAuthority> admins;