- 博客(11)
- 收藏
- 关注
原创 后台Long类型传到前端精度缺失问题
问题描述后端:前端:解决方式实体类加@JsonFormat(shape = JsonFormat.Shape.STRING)注解
2022-05-07 17:54:18
245
原创 java字符串转List
//获取json中参数JSONObject jsonObject = JSONObject.parseObject(response.getBody());String schoolList = jsonObject.getString("schoolList"); List<SchoolList> schoolLists = JSONArray.parseArray(schoolList, SchoolList.class);
2021-11-30 19:56:23
435
原创 包装类转换
//int转Integer Integer in1 = new Integer(1); //Integer转int int i2 = in1.intValue(); //Integer转String String s1 = in1.toString(); //String转Integer Integer s2 = new Integer(s1); //int转String int i3 = 1; String s3 = String.valueOf(...
2021-08-09 17:23:42
114
原创 Map的遍历方式
public class ceshi3 { public static void main(String[] args) { Map<String, String> map = new HashMap<>(); map.put("01", "山东"); map.put("02", "菏泽"); map.put("03", "曹县"); //增强for遍历 Set<String> set = map.keySet(); fo.
2021-08-09 16:51:38
109
原创 递归的简单实现
递归,就是在运行的过程中调用自己。package com.itgaoshu.springboot_day01.test;import org.springframework.boot.ansi.AnsiOutput;public class DiGui { /** * 使用递归算1-n的和 */ public static int sum(int n){ if(n==1){ System.out.println(n);
2021-08-09 16:48:39
146
原创 shiro与thymeleaf整合以及config
自己记录着玩pom.xml<!--shiro标签和thymeleaf的整合依赖--> <dependency> <groupId>com.github.theborakompanioni</groupId> <artifactId>thymeleaf-extras-shiro</artifactId> <version>2.0.
2021-07-22 20:06:01
201
原创 Vue中的组件与路由的简单组合使用
自己的学习笔记,日后使用现在我们来实现这样一个功能:一个页面,包含登录和注册,点击不同按钮,实现登录和注册页切换:1,在Terminal中进入自己写的vue目录,先输入:npm init -y 进行初始化2,安装Vue,输入命令:npm install vue --save3,使用npm安装动态路由功能 :npm install vue-router --savelogin.js中var loginForm = { template:'' + '
2021-07-22 15:46:15
322
原创 不使用Spring中的注解,获取工厂中的指定对象
package com.baizhi.springboot_jsp_shiro.util;import org.springframework.beans.BeansException;import org.springframework.context.ApplicationContext;import org.springframework.context.ApplicationContextAware;import org.springframework.stereotype.Compon.
2021-07-11 15:47:43
298
原创 Shiro学习笔记
根据B站不良人的Shiro随堂代码认证使用ini方式在resources下创建shiro.ini数据如下[users]xiaowu=123zhangsan=123456lisi=789创建TestAuthenticator测试package com.baizhi;import org.apache.shiro.SecurityUtils;import org.apache.shiro.authc.IncorrectCredentialsException;impor
2021-07-10 14:46:25
209
原创 Shiro简单使用
(1)Subject:代表了当前"用户",这个用户不一定是一个具体的人, 与当前应用交互的任何东西都是Subject。(2)SecurityManager:安全管理器;即所有与安全有关的操作都会与SecurityManager交互;且其管理着所有Subject;可以看出它是Shiro的核心,它负责与Shiro的其他组件进行交互,它相当于SpringMVC中DispatcherServlet的角色。(3)Authenticator:认证。验证用户是否合法,也就是登录。利用Shiro进行...
2021-07-07 19:40:44
283
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅