包:

src:

main:

java:

resources:

static:

templates:

test:

2.在static导入jquery源文件,在templates写入jsp文件

3.配置文件:

server.port=8888
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.jsp

4.mvc自动略掉jquery,交个tomcat处理:

@Configuration
public class MyMvcConfig extends WebMvcConfigurationSupport { @Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
super.addResourceHandlers(registry);
}
} 5.jquery导入jsp:
<script type="text/javascript" src="../static/jquery.js">
</script> <script>
// $(function () {
// alert("ccccccccccc")
// }) $(document).ready(function () {
alert("hhhhhhhhh")
}) alert("ggggggg")
</script>

最新文章

  1. 项目管理的一些Tip
  2. LINUX 文件权限详解
  3. 增加线程异步发送消息的方法二(Runnable)
  4. 给angularJs的service建模
  5. SQL SERVER与C#中数据类型的对应关系
  6. wordpress网站被挂马以及防御方法
  7. 几种C#程序读取MAC地址的方法
  8. 转: 基于nginx的hls直播系统
  9. python3实现的web端json通信协议
  10. wpa_supplicant对wep,wpa,wpa2的psk和隐藏ap的scan_ssid扫描配置
  11. 深度学习Matlab DeepLearningToolBox 工具包最常见错误解决办法\
  12. 一直想测试的NGINX变量输出,最于有办法了。
  13. Linux shell中的I/O重定向相关(转)
  14. 010_TCP queue的研究
  15. Linq指令执行分析
  16. SQL Server 排序的时候使 null 值排在最后
  17. Centos7安装Wkhtmltopdf -- nodejs将html转pdf
  18. 【Java】HashTable和HashMap区别
  19. delete千万级别大表中的某部分数据
  20. LeetCode——Arithmetic Slices

热门文章

  1. Windows&amp;Appium&amp;Java&amp;Python自动化测试-配置开发环境
  2. linux自由软件安装 ./config, make的理解
  3. keeping
  4. docker化canal与canal-adapter
  5. 洛谷P1080 国王游戏【大数】【贪心】
  6. vs2015 远程调试web
  7. [2019HDU多校第一场][HDU 6578][A. Blank]
  8. 生成和安装requirements.txt依赖
  9. 查看nginx服务器状态
  10. 【leetcode】1269. Number of Ways to Stay in the Same Place After Some Steps