原创 Django 權限Permissions python

權限全局配置: REST_FRAMEWORK = {   'DEFAULT_PERMISSION_CLASSES': (     'rest_framework.permissions.IsAuthenticated',   ) }

原创 nginx 三、 負載均衡

#user  nobody; worker_processes  2; #error_log  logs/error.log; #error_log  logs/error.log  notice; #error_log  logs

原创 jpa 通過EntityManager獲取 所有實體類 屬性 及其對應的表 字段名

//通過EntityManager獲取factory EntityManagerFactory entityManagerFactory = (你自己的entityManager對象).getEntityManagerFactory()

原创 TortoiseGit 配合msysGit在Git@OSC代碼託管的傻瓜教程

命令行太麻煩,腫麼破?便便利用睡覺的時間解決了一點效率問題,tortoiseGit處理GitHub,一樣可以處理Git@osc ,雖然說可以用gitk來調出圖形界面,but,我就是不想看見黑黑的命令提示符的框框,於是乎,近乎龜毛到變態的便

原创 用IDEA生成javadoc文檔 javadoc註釋規範

1 用IDEA生成javadoc文檔 打開相應的選項面板 設置 -encoding是java代碼編碼,-charset是對生成文檔所用的編碼。-windowtitle就是對應html的<title>標籤 1 -encoding

原创 Spring Boot 異步線程

一般的後臺管理系統都有導出報表的功能,對於大數據量的報表導出,通常比較耗時,比如管理員點擊一個導出按鈕,往往要等待很長的時間直到報表成功導出纔可以進行下一步操作,顯然這種同步的方式已經滿足不了需求了。現在實際開發中常用的方式是採用JMS

原创 java8 雙冒號

public class MyTest {     public static void  printValur(String str){         System.out.println("print value : "+str)

原创 uniapp h5 位置選擇,微信定位+騰訊位置服務獲取當前地址,逆地址解析

一、獲取當前地理座標 首先引入JSSDK npm install jweixin-module --save 使用 var jweixin = require('jweixin-module') jweixin.read

原创 線程安全實體管理器助手,EntityManager對象

import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persis

原创 LocalDateTime返回的格式爲 2019-10-11T20:20:45,處理json返回時間中帶有T的情況/// 接收LocalDateTime參數, 推薦的 兩個都能解決

因爲LocalDateTime默認使用的iso 時間格式:所以返回json的時候時間會出現T    /**      * The ISO date-time formatter that formats or parses a da

原创 碼雲 git clone,和 git更新文件衝突

如果系統中有一些配置文件在服務器上做了配置修改,然後後續開發又新添加一些配置項的時候, 在發佈這個配置文件的時候,會發生代碼衝突: error: Your local changes to the following files woul

原创 nginx 二、 反向代理

#user  nobody; worker_processes  1; #error_log  logs/error.log; #error_log  logs/error.log  notice; #error_log  logs/e

原创 nginx 一、 gzip  壓縮

#user  nobody; worker_processes  1; #error_log  logs/error.log; #error_log  logs/error.log  notice; #error_log  logs/e

原创 !important 我都忘記用了,有時候真好用

!important  我都忘記用了,有時候真好用。 做一個vue項目,動態加載主題。 裏面本來有一個全局樣式,但是 修改主題後,加載了一個新的樣式,將我自定義的樣式覆蓋了。我本來還想,在最後動態加載個css來着,突然搜到importan

原创 各種stream操作:從集合中獲取符合條件的元素

java8stream操作:從集合中獲取符合條件的元素     List<Student> students = new ArrayList<>();         students.add(new Student(1,"張三",9