springboot和jsp,以及引入jquery
2024-10-06 21:00:01
包:
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>
最新文章
- 项目管理的一些Tip
- LINUX 文件权限详解
- 增加线程异步发送消息的方法二(Runnable)
- 给angularJs的service建模
- SQL SERVER与C#中数据类型的对应关系
- wordpress网站被挂马以及防御方法
- 几种C#程序读取MAC地址的方法
- 转: 基于nginx的hls直播系统
- python3实现的web端json通信协议
- wpa_supplicant对wep,wpa,wpa2的psk和隐藏ap的scan_ssid扫描配置
- 深度学习Matlab DeepLearningToolBox 工具包最常见错误解决办法\
- 一直想测试的NGINX变量输出,最于有办法了。
- Linux shell中的I/O重定向相关(转)
- 010_TCP queue的研究
- Linq指令执行分析
- SQL Server 排序的时候使 null 值排在最后
- Centos7安装Wkhtmltopdf -- nodejs将html转pdf
- 【Java】HashTable和HashMap区别
- delete千万级别大表中的某部分数据
- LeetCode——Arithmetic Slices
热门文章
- Windows&;Appium&;Java&;Python自动化测试-配置开发环境
- linux自由软件安装 ./config, make的理解
- keeping
- docker化canal与canal-adapter
- 洛谷P1080 国王游戏【大数】【贪心】
- vs2015 远程调试web
- [2019HDU多校第一场][HDU 6578][A. Blank]
- 生成和安装requirements.txt依赖
- 查看nginx服务器状态
- 【leetcode】1269. Number of Ways to Stay in the Same Place After Some Steps