freemarker 模板報(bào)錯(cuò)
@Controller
@RequestMapping("ftl")
public class IndexController {
????@Autowired????
????private Resource resource;
????@RequestMapping("/index")
????public String index(ModelMap map) {
????????map.addAttribute("resource", resource);
????????????return "index";
????????}
}
freemarker 模板報(bào)錯(cuò)?
Description: Field resource in com.hibo.controller.IndexController required a bean of type 'org.springframework.core.io.Resource' that could not be found.
Action: Consider defining a bean of type 'org.springframework.core.io.Resource' in your configuration.
2019-03-23
我也是這個(gè)錯(cuò)誤,這個(gè)你怎么解決的
2018-06-25
問題解決