原创 SpringBoot Redis 緩存

下載地址:https://github.com/MSOpenTech/redis/releases可視化管理工具: https://redisdesktop.com/downloadRedis 支持 32 位和 64 位。這個需要根據你係

原创 使用 Generator 代碼生成器

說明:Generator 作爲一個生成工具,不光侷限於 SpringBoot 、SSH  、SSM ,它只是一個工具。僅以 mysql 爲例, 會生成對象文件至  D:/source1、 添加 Mavne 庫<dependency>   

原创 Spring boot 教程 一 創建簡單的 WEB 工程

1、安裝 Spring Boot 插件  Help -> Eclipse Marketplace  Installed 安裝2、新建 Spring Boot 項目  New -> Other -> Spring Boot -> Sprin

原创 SpringBoot 單元測試

1. 單元測試需添加標籤,表示單元測試@RunWith(SpringRunner.class) @SpringBootTest2.在測試的方法上加標籤@Test3.測試 Servicepackage com.example; impor

原创 SpringBoot 異步

1. 在程序入口加入開啓異步標籤@EnableAsync2. 在需要執行異步的類中加入標籤 (工具類)package com.example.utils; import java.util.concurrent.Future; imp

原创 SpringBoot AOP

AOP 不侷限於SpringBoot,這只是AOP在SpringBoot下應用。1.添加依賴<dependency> <groupId>org.springframework.boot</groupId> <artifactId>sp

原创 SpringBoot application.properties 常見配置

## server.port=8081 ## 配置訪問路徑,默認爲/ server.context-path=/hello # mysql spring.datasource.url=jdbc:mysql://127.0.0.1:330

原创 Json 工具類

// 定義jackson對象 private static final ObjectMapper MAPPER = new ObjectMapper(); /** * 將對象轉換成json字符串。

原创 SSM 框架 Maven項目 Spring整合Mybatis

項目結構 數據庫表結構 pom.xml  添加完之後 右鍵項目 maven-update project, 要確保web.xml的頭信息正確 (在創建Maven web  工程時,有對web.xml 頭部進行更改) <project

原创 SSM 框架 Maven項目 項目整合 SpringMVC

項目結構   web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi

原创 Eclipse 安裝 Mybatis Generator 插件 並使用 xml 方式生成

Help ---> Eclipse Marketplace  --> 搜索 Mybatis Generator  --> Install  安裝即可。在src/main/resources下添加 名爲generatorConfig.xml

原创 SpringBoot 定時任務

1. 在程序入口加入開啓定時標籤@EnableScheduling2. 在需要執行定時的類中加入標籤package com.example.utils; import java.text.SimpleDateFormat; import

原创 Spring Boot thymeleaf模板 和 freeMark模板

1. pom.xml <!-- Spring Boot Freemarker 依賴 --> <dependency>     <groupId>org.springframework.boot</groupId>    

原创 Jquery 對控件 display屬性的管理

html/jsp style="display:none" js  顯示或隱藏$('#bookDiv').css('display','none'); $('#bookDiv').css('display','block'); 

原创 Spring boot 教程 二 使用devtools來實現熱部署

Eclipse下使用spring-tool-suite插件創建一個spring boot 工程,通過右鍵“Run As”--->"Spring Boot App"來啓動工程,這時當我們對工程的內容進行修改的時候,需要重新操作剛纔的步驟來重