主题:集成spring boot 为啥会一直404

chenxh0428 2019年09月05日 41

刚刚接触这个beetl,看着视频照做,但是一直都404,。啥情况呀

image.png

Gavin 2019年09月05日
@Bean(name = "beetlViewResolver")    
public BeetlSpringViewResolver getBeetlSpringViewResolver(BeetlGroupUtilConfiguration beetlGroupUtilConfiguration) {        
  BeetlSpringViewResolver beetlSpringViewResolver = new BeetlSpringViewResolver();        
  beetlSpringViewResolver.setContentType("text/html;charset=UTF-8");        
  beetlSpringViewResolver.setOrder(0);        
  beetlSpringViewResolver.setConfig(beetlGroupUtilConfiguration);        
  return beetlSpringViewResolver;    
}

如果想直接返回字符串,需要加上 beetl的 视图


看一下视频中这个类com.ibeetl.blog.config. BeetlConfig