Fullstar

Archives

  • December 2025
  • August 2024
  • July 2024
  • February 2024
  • November 2023
  • August 2023
  • July 2023
  • January 2023
  • November 2022
  • October 2022
  • September 2022
  • February 2022
  • January 2022
  • September 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Categories

  • Code
  • Lens
  • Life
0
Fullstar
  • Code

Springboot常用依赖/工具包

  • October 30, 2020
  • Brandon

Looking for a Shorter Overview?

AI Summary

前端可通过 WebJars 集成 Bootstrap 和 jQuery,并配置 Thymeleaf 命名空间及常用弹窗、上传组件。后端列出热部署、WebSocket 和 Shiro 的 Maven 依赖,其中热部署还需关闭 Thymeleaf 缓存。

Key Moments

AI-generated
1

通过 WebJars 引入 Bootstrap 与 jQuery

在 Maven 中添加 Bootstrap 3.3.5 和 jQuery 3.1.1 依赖,并通过 /webjars 路径引用样式和脚本。
2

配置 Thymeleaf 模板命名空间

在 HTML 根标签中声明 xmlns:th 命名空间,以便使用 Thymeleaf 模板属性。
3

启用 Spring Boot 热部署

添加 spring-boot-devtools 运行时依赖,并将 spring.thymeleaf.cache 设为 false 以便及时查看模板修改。
4

集成 WebSocket 与 Shiro

分别添加 spring-boot-starter-websocket 和 shiro-spring 依赖,为实时通信和权限管理提供支持。
Total
0
Shares
0
0
0

一.前端部分

1.bootstrap+jquery

<dependency>
	<groupId>org.webjars</groupId>
	<artifactId>bootstrap</artifactId>
	<version>3.3.5</version>
</dependency>
<dependency>
	<groupId>org.webjars</groupId>
	<artifactId>jquery</artifactId>
	<version>3.1.1</version>
</dependency>

引用链接:

<link rel="stylesheet" href="/webjars/bootstrap/3.3.5/css/bootstrap.min.css" />
<script src="/webjars/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>

2.常用前端组件下载:
1.layer.js (弹窗组件)
2.fileinput (文件上传组件)

3.thymeleaf名字空间

<html lang="en" xmlns:th="http://www.thymeleaf.org">

二.后端部分

1.热部署

<!--引入支持热部署的依赖-->
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-devtools</artifactId>
	<optional>true</optional> <!-- 这个需要为 true 热部署才有效 -->
	<scope>runtime</scope>
</dependency>
IDEA SpringBoot热部署设置

application.properties添加语句:spring.thymeleaf.cache=false

2.WebSocket

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

使用案例见:https://www.fullstar.tech/427/

3.shiro

<dependency>
	<groupId>org.apache.shiro</groupId>
	<artifactId>shiro-spring</artifactId>
	<version>1.4.1</version>
</dependency>

使用案例见:https://www.fullstar.tech/934/

Related Posts

AI-generated

SpringBoot+WebSocket

按wid维护WebSocket连接,后端可向指定用户推送任务提醒;前端即时弹窗接收消息,还能借助账号连接检测实现伪单点登录。
69.8% match October 27, 2020

Shiro基本使用

从UserRealm的账号密码认证,到user:add权限授权,再到Shiro过滤链和Thymeleaf页面标签,快速搭建可登录、可拦截、可按权限显示按钮的基础安全功能。
69% match October 31, 2020

Questions Answered

AI-generated

如何在 SpringBoot 中引入 Bootstrap 和 jQuery?

通过 WebJars 依赖添加指定版本,并使用对应静态资源路径引用。

Thymeleaf 页面如何声明命名空间?

在 HTML 根标签添加 xmlns:th 属性即可使用模板指令。

SpringBoot 热部署需要哪些配置?

引入 devtools、设为可选运行时依赖,并关闭模板缓存。

如何为 SpringBoot 添加 WebSocket 和 Shiro?

分别引入 WebSocket 启动器与 shiro-spring 依赖实现功能支持。

Next Up

实时消息推送
配置Shiro权限
微信小程序实战
常用网址清单
Total
0
Shares
Share 0
Tweet 0
Pin it 0
Brandon

Previous Article
  • Code

SpringBoot+WebSocket

  • October 27, 2020
  • Brandon
View Post
Next Article
  • Code

Shiro基本使用

  • October 31, 2020
  • Brandon
View Post
You May Also Like
View Post
  • Code

Letta部署记录

  • Brandon
  • December 26, 2025
View Post
  • Code

WordPress 后台任务利器:使用 BGRunner 构建可靠的异步处理

  • Brandon
  • December 14, 2025
View Post
  • Code

WordPress image offload

  • Brandon
  • December 14, 2025
View Post
  • Code

ComfyUI应用手册

  • Brandon
  • December 6, 2025
View Post
  • Code

Leetcode Java常用代码

  • Brandon
  • February 17, 2024
View Post
  • Code

Golang入门

  • Brandon
  • February 4, 2024
View Post
  • Code

Setting Up and Maintaining a Ubuntu Environment for My Home Server

  • Brandon
  • November 24, 2023
View Post
  • Code

Swift Learning Log

  • Brandon
  • August 31, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Fullstar

Input your search keywords and press Enter.

SpringBoot+WebSocket

Shiro基本使用

基于vue的微信小程序开发

网址收藏夹

JDBC操作Hive概述

MapReduce代码编写总览

UP NEXT

SpringBoot+WebSocket

69.8% match October 27, 2020 0