Skip to content

Commit

Permalink
πŸ‡ fix const CLASSPATH on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Aug 3, 2017
1 parent 9b3e7a1 commit c41038a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/blade/mvc/ui/template/DefaultEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
* default template implment
*
* @author biezhi
* 2017/5/31
* 2017/5/31
*/
public class DefaultEngine implements TemplateEngine {

public static String TEMPLATE_PATH = "templates";

@Override
public void render(ModelAndView modelAndView, Writer writer) throws BladeException {
String view = modelAndView.getView();
String viewPath = Const.CLASSPATH + TEMPLATE_PATH + File.separator + view;
viewPath = viewPath.replace("[//]", "/");
String view = modelAndView.getView();
String viewPath = Const.CLASSPATH + File.separator + TEMPLATE_PATH + File.separator + view;
viewPath = viewPath.replace("//", "/");
try {
Request request = WebContext.request();
String body = IOKit.readToString(viewPath);
String body = IOKit.readToString(viewPath);

Map<String, Object> attributes = new HashMap<>();
attributes.putAll(request.attributes());
Expand Down

0 comments on commit c41038a

Please sign in to comment.