问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
application.yml配置
spring:
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .ftl
encoding: utf-8
datasource:
driver-class-name: com.mysql.jdbc.Driver
username: root
password: 123456
url: jdbc:mysql://localhost:3306/wxdcxt?useUnicode=true&characterEncoding=utf-8
jpa:
show-sql: true
jackson:
default-property-inclusion: non_null
mvc:
static-path-pattern: /static/**
server:
servlet:
context-path: /sell
# 相当于springmvc中/views中的 uri
#server:
# servlet:
# context-path: /apache-tomcat-7.0.90
add.ftl 部分代码
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<title>686 Adminize</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="http://fonts.googleapis.com/css?family=Oxygen|Marck+Script" rel="stylesheet" type="text/css">
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="./css/font-awesome.css" rel="stylesheet">
<link href="../css/admin.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
项目目录如下
你期待的结果是什么?实际看到的错误信息又是什么?
网上试了多种方法,始终找不到
既然用了thymeleaf, 为何不使用@{}这样的写法
详见https://blog.csdn.net/qq_3292... URL部分