@Controller @RequestMapping(value="/base") public class FileController extends BaseController
| Constructor and Description |
|---|
FileController() |
| Modifier and Type | Method and Description |
|---|---|
void |
getJs(java.lang.String ClassPath,
bap.core.strongbox.controller.FileController.ContentType type,
javax.servlet.http.HttpServletResponse response)
"/file/{classPath}/type"
外部调用类似这样
http://localhost:8080/tf/base/file/bapx.base.popup.file.simplemodal
.css/css 就返回了 bapx.base.popup.file包下的simplemodal.css文件
|
void |
initBinder(org.springframework.web.bind.WebDataBinder binder) |
getBaseDao, setBaseDao@RequestMapping(value="/file/{ClassPath}/{type}")
public void getJs(@PathVariable(value="ClassPath")
java.lang.String ClassPath,
@PathVariable(value="type")
bap.core.strongbox.controller.FileController.ContentType type,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
ClassPath - 资源所在的classpath。注意,资源文件名除了后缀不可包含. 比如: jquery.simpleModal.js
就不合法,需要改成jquery-simpleModal.jstype - 文件返回的类型response - java.io.IOException@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
initBinder in class BaseController