public Routes setBaseViewPath ( String baseViewPath ) { if ( StrKit . isBlank ( baseViewPath ) ) { throw new IllegalArgumentException ( "baseViewPath can not be blank" ) ; } baseViewPath = baseViewPath . trim ( ) ; if ( ! baseViewPath . startsWith ( "/" ) ) { // add prefix "/" baseViewPath = "/" + baseViewPath ; } if ( baseViewPath . endsWith ( "/" ) ) { // remove "/" in the end of baseViewPath baseViewPath = baseViewPath . substring ( 0 , baseViewPath . length ( ) - 1 ) ; } this . baseViewPath = baseViewPath ; return this ; }
Set base view path for controller in this routes