webjars
WebJars the Web front-end resources such as CSS and Javascript packaged into Java Jar package,
Maven dependency management so as to enable the JavaScript support static library / CSS libraries, such as jQuery, layui and so on.
Bottom line: We use the convenient front-end framework.
When introduced to the use of the form / webjars / ** a.
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Title</title> 6 <link rel="stylesheet" href="/webjars/layui/2.5.4/css/layui.css"> 7 </head> 8 <body> 9 <button type="button" class="layui-btn" id="btn">点击</button> 10 <script type="text/javascript" src="/webjars/layui/2.5.4/layui.js"></script> 11 <script> 12 layui.use(['element','jquery', 'layer'],function () { 13 var element = layui.element; 14 var $ = layui.jquery; 15 $('#btn').on('click', function () { 16 layer.msg("点击了button") 17 }) 18 }) 19 </script> 20 </body> 21 </html>
springboot hot start
Introducing spring-boot-devtools can rely.
1 <dependency> 2 <groupId>org.springframework.boot</groupId> 3 <artifactId>spring-boot-devtools</artifactId> 4 <optional>true</optional> 5 </dependency>