Adding a custom page in spring roo

前端 未结 3 952
孤街浪徒
孤街浪徒 2021-01-01 02:17

I have a question about spring roo.

How can you add a custom page to your web application? It seems really basic and easy if I\'m using standard Servlet, but I\'m to

3条回答
  •  失恋的感觉
    2021-01-01 02:59

    First of all edit your {project_root}/src/main/webapp/WEB-INF/spring/webmvc-config.xml and add new mvc:view-controller definition for your new page. Something like:

    
    

    Then open {project_root}/src/main/webapp/WEB-INF/views/views.xml and add the following definition:

      
        
      
    

    And add your custompage.jspx to the {project_root}/src/main/webapp/WEB-INF/views/ folder.

    And then edit {project_root}/src/main/webapp/WEB-INF/views/menu.jspx and new menu:item with url="/custompage".

    I think it should work.

提交回复
热议问题