lift中的路径映射

以下英文引用自:http://simply.liftweb.net/index-3.3.html#toc-Subsection-3.3.1

引用
Once the access control is granted by SiteMap, Lift loads the view related to the URL. There are many mechanisms that Lift uses to resolve a path to a view, but the simplest is a one to one mapping between the URL path and the files in /src/main/webapp. If the URL is /index, then Lift will look for the localized (see 8.1 on page 1↓) version of /src/main/webapp/index.html. Once Lift loads the template, Lift processes it to transform it into the dynamic content you want to return in response to the URL input.


路径映射由SiteMap控制,如果有的话(Boot.scala文件中).
最简单的映射机制是一对一的映射,将URL路径映射到/src/main/webapp目录下,如果URL是/index,那lift会查找/src/main/webapp/index.html文件,前提是SiteMap未设置.

你可能感兴趣的:(路径)