不同之处已做高亮。
jsp 写法:
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-3.2.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/login.css"></link>
<script type="text/javascript"> $.ajax({ url : '${pageContext.request.contextPath }/syslogin/login'
)}
</script>
spring boot thymeleaf 写法:
<script type="text/javascript" th:src="@{/js/jquery-3.2.0.min.js}"></script>
<link rel="stylesheet" type="text/css" th:href="@{/css/login.css}">
<script type="text/javascript"> $.ajax({ url : '[[@{/syslogin/login}]]' )} </script>