SpringBoot实战开发后台管理-静态资源的导入
架构模式
单体架构
springboot + mybatisplus + mysql
1、概述
把后台所需要的html、CSS、 js、 fofts导入到项目中templates目录下。
着重引入: jquery & layerui
2、导入静态资源和动态模板
静态资源是放入在resources/static目录中。
页面视图模板: templates下方
静态资源:所谓的js、css、 fonts、 html.
视图模板: html(动态模板) (freemarker + thymeleaf)
3、关于统一增加的路由的继承
因为在后台中,每个路由都会增加一个/admin路径。比如
/admin/login
/admin/index
/admin/state/list
/admin/state/add
可以使用父类来完成的基础路径的设定
package com.example.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annota