0
私はここに奇妙な問題があります。私は日食から実行すると、以下の設定は正常に動作します。 jarをビルドし、次のリクエストマッピングのために404を投げて実行します。さらに、デバッグは接頭辞接頭辞:classpath:/ templates/throwing 404
spring:
profiles:
active: dev
mustache:
prefix:classpath:/templates/
suffix:.html
を次のように私は私のapplication.ymlに口ひげを設定しているNull modelAndView found
のように私にエラーを与えたI以下のフォルダ構造を持っている
私のコントローラ
@Controller
public class MainController {
@RequestMapping("/home1")
ModelAndView home1() {
ModelAndView modelAndView =new ModelAndView();
Map<String,Object> modelObjects = new LinkedHashMap<String,Object>();
modelAndView.addObject("modelObjects", modelObjects);
modelAndView.setViewName("/home");
return modelAndView;
}
}