原创 linux 切換Java版本不正確

Linux 下切換Java時總會遇上java -version 版本不正確的情況,使用which java 得 /usr/bin/java 從百度得知需要將/usr/bin 下的java鏈接刪掉,然後從新鏈接到心得Java版本,具體

原创 failed to resolve:com.github.********

在項目下面的build.gradle中的 allprojects { repositories { jcenter() } } 加入 maven {url"https://jitpack.io"} 即改爲

原创 Generation Warnings Occured Project *** does not exist

使用mybatis generation 報錯 Generation Warnings Occured Project *** does not exist Project *** does not exist Project

原创 解決mybatis查詢日期時間數據得到long類型數據的問題

使用mybatis查詢數據時,如果數據庫存儲的是timestamp、datetime、date、time等時間類型,而Java bean也使用的是date類型,mybatis會自動將date類型轉換爲unix long時間eg:1503

原创 Spring boot使用@Select註解報錯

Spring boot使用@Select註解報錯 2017-12-14 17:52:03.129 DEBUG 5148 — [nio-8180-exec-2] c.m.p.mapper.ext.PriceExt.queryById

原创 MySQL check the manual that corresponds to your MySQL server version for the right syntax

MySQL check the manual that corresponds to your MySQL server version for the right syntax 使用powerDesigner生成sql文件運行報錯。 查

原创 MySql 根據身份證號獲取省份、年齡、性別

select case left(card_no,2) when '11' then '北京市' when '12' then '天津市' when '13' then '河北省' when '14' then '山西省' when

原创 spring boot 返回的json中去掉值爲null的屬性

spring boot會自動將返回的對象實例自動轉化爲json格式,如果對象中含空值的時候,json就會出現value值爲null的情況,前端則會顯示出null. 共有兩種辦法可以解決 1.將null值轉化爲空字符串 百度了下沒看懂,希

原创 Struts2的核心配置文件

web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="

原创 使用hibernate生成表結構

準備工作 首先創建一個空的web項目,在其中添加hibernate的jar包 在src目錄下創建hibernate配置文件:hibernate.cfg.xml (如果使用intellij idea創建maven項目,src默認不是So

原创 jsp頁面中不能使用El表達式

在jsp頁面上加入:<%@page isELIgnored=”false” %>

原创 設計原則

設計原則 2017-11-18 今天週一呢 今天週一呢 在接下來的1-2月的時間裏,我將會和大家一同學習設計模式之禪這本書,這本書一共包括“六大心法,23種武林招式”,也就是六大設計原則和23種設計模式,希望能對你有幫助。

原创 設計原則(二)

​今天被我荒廢了 仔細閱讀本文大約需要2分57秒46毫秒 上篇文章(設計原則) 二、Liskov Substitution Principle(LSP)里氏替換原則 LSP的定義有兩個: 第一種定義,也是最正宗的定義

原创 在intellij idea中使用Hibernate詳細

1.在intellij idea中添加Hibernate support 在file->setting->plugins搜索Hibernate 選中Hibernate support和Persistence frameworks S

原创 jsp探針

保存爲.jsp文件 <%@page contentType="text/html;charset=UTF-8"%> <%@page import="java.io.*,java.util.*,java.net.*" %> <%! Stri