将实用程序方法设为静态或在原型范围内设为非静态更有意义吗?
IE
public static void setPdfVariables(String pdfFileName, boolean isDebugEnabled, ModelAndView modelAndView){
modelAndView.addObject(PDF_FILE_NAME_KEY, pdfFileName);
modelAndView.addObject(IS_DEBUG_ENABLED_KEY, isDebugEnabled);
}
或具有原型范围
public void setPdfVariables(String pdfFileName, boolean isDebugEnabled, ModelAndView modelAndView){
modelAndView.addObject(PDF_FILE_NAME_KEY, pdfFileName);
modelAndView.addObject(IS_DEBUG_ENABLED_KEY, isDebugEnabled);
}