原创 oauth2配置使用redisTokenService問題

  package com.lsh.product.config; import org.springframework.beans.factory.annotation.Autowired; import org.springfra

原创 mybatis配置實體關係映射時Result Maps collection does not contain value for xxxxxx

使用mybatis的association關聯查詢,程序設計應該是返回實體類,一時大意寫成resultMap,改回resultType所有問題解決!!!                 參考 https://blog.csdn.net/s

原创 eclipse安裝jadclipse

自己安裝操作 1. 下載 JadClipse 下載JadClipse:http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#Download 注意選擇與  eclipse合適的

原创 submit 設置提交表單後不刷新頁面 (使用layui衝突)

驗證不通過時,頁面直接刷新,layui提示一閃而過     <form id="modifyForm"  target="test"> <input type="text" id="phone" name="phone" /> <inpu

原创 mybatis generator配合lombok使用

生成jar 有jar可直接點擊 jar下載地址 1 新建一個springboot項目 路徑和圖裏一致 LombokPlugin package org.mybatis.generator.plugins; import org

原创 @EnableGlobalMethodSecurity三方法詳解

      @EnableGlobalMethodSecurity三方法詳解 要開啓Spring方法級安全,在添加了@Configuration註解的類上再添加@EnableGlobalMethodSecurity註解即可   @Con

原创 springboot整合shiro,設置不攔截css和js

login.html   <!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <meta name="viewport" content=

原创 springboot攔截器/*與/**

  import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.web.servlet.FilterRegistrati

原创 mysql優化面試總結

總結   1.數據庫的設計 儘量把數據庫設計的更小的佔磁盤空間. 1).儘可能使用更小的整數類型.(mediumint就比int更合適). 2).儘可能的定義字段爲not null且設定默認值,除非這個字段需要null. 3).只創建確實

原创 對象轉map

    /**      * 將對象轉爲map集合      * @param obj      * @return      * @throws Exception      */     public static Map<Strin

原创 密碼不能包括連續的3個字符鍵盤鍵位,如qaz、qwe、mko等等。

@Test public void test5() { char[][] keyCode = { {'q','w','e','r','t','y','u','i','o','p'}, {'a','s','d','f','g','h',

原创 javabean map list?轉listmap

package a;import java.beans.PropertyDescriptor;import java.lang.reflect.Constructor;import java.lang.reflect.Field;impo

原创 Java執行時發生異常,但是無法跳到Catch異常區塊,異常類型InputMismatchException

問題:Java執行時發生異常,但是無法跳到Catch異常區塊,異常類型InputMismatchException。問題描述:package Demo3;import java.util.InputMismatchException;im

原创 (String)、toString、String.valueOf的區別

    在Java項目的實際開發和應用中,常常需要用到將對象轉爲String這一基本功能。本文將對常用的轉換方法進行一個總結。       常用的方法有(String)要轉換的對象,Object#toString(),String.val

原创 java流讀取txt文件並寫入另一個txt文件

import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;import java.io.FileInputStream;import j