昨天用SpringBoot写一个小工具,需要引入js文件,但是一直无法加载js文件,js
中"$ is undefined",然后找了半天,最后然后发现,我在pom.xml文件里引入了SpringBoot自带的thymeleaf ,是不是这个与js产生了冲突,
<!--thymeleaf -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
然后试着把这个依赖去掉,重启一下,然后就可以正常使用了,nice