Time of Update: 2015-10-30
maven項目下jsp檔案中el運算式失效問題,mavenel本來是為了寫個springmvc的小demo,雛形搭建起來後想起來做成maven的好了,就重建立的maven項目,坑就從這裡開始了...maven建立web項目預設使用的是web 2.3版本,web.xml檔案頭中也是2.3的版本..說實話之前沒怎麼用maven建立過項目,後來覺得maven項目看源碼太方便了才更偏向於用maven的,所以這裡也根本沒在意..引入的javax-servlet-api
Time of Update: 2015-10-30
Play Framework 完整實現一個APP(八),frameworkapp建立Tag標籤 1.建立Model@Entity@Table(name = "blog_tag")public class Tag extends Model implements Comparable<Tag> { public String name; private Tag(String name) { this.name = name; }
Time of Update: 2015-10-30
Spring MVC篇一、搭建Spring MVC架構,搭建springmvc架構本項目旨在搭建一個簡單的Spring MVC架構,瞭解Spring MVC的基礎配置等內容。一、項目結構本項目使用idea intellij建立,配合maven管理。整體的目錄結構其中java檔案夾是sources檔案夾,resources是資源檔夾。spring檔案夾裡是Spring上下文配置和Spring
Time of Update: 2015-10-30
在已有jdk7環境下安裝jdk6,遇到installer:Wrapper.CreateFile failed with error 3:The system cannot find the path
Time of Update: 2015-10-30
遞迴實現n(經典的8皇后問題)皇后的問題,遞迴皇后 問題描述:八皇后問題是一個以國際象棋為背景的問題:如何能夠在8×8的國際象棋棋盤上放置八個皇后, 使得任何一個皇后都無法直接吃掉其他的皇后?為了達到此目的,任兩個皇后都不能處於同一條橫行、縱行或斜線上,此問題進而可以推廣為n皇后的問題。 解題思路:n*n的矩陣,遞迴每一個點,當皇后數量達到n的時候,進行判斷,若滿足題目條件,則答案加一(number++),否則繼續進行遍曆。 儲存皇后點的方法:構造一個二維數組reserve[]
Time of Update: 2015-10-30
Java synchronized同步
Time of Update: 2015-10-30
Play Framework 完整實現一個APP(十),frameworkapp 1.定製Comment列表新增加Comment list頁面,執行命令列> play crud:ov --template Comments/list 會產生/app/views/Comments/list.html 產生的檔案中 #{crud.table /} 是表格的內容,可以替換為一下內容,顯示更多的列#{crud.table fields:['content'
Time of Update: 2015-10-30
Shiro 緩衝失效以後的一個問題,shiro失效shiro 1.2.2和1.2.3 為shiro設定了緩衝,但是當伺服器運行幾個小時後,頁面判斷 <shiro:hasPermission name="admin"><li
Time of Update: 2015-10-30
設計模式--抽象原廠模式【 Abstract Factory Pattern】聲明:本文從網路書籍整理而來,並非原創。上一次Factory 方法模式講到女媧造人,人是造出來了,世界熱鬧了,可是低頭一看,都是清一色的類型,缺少關愛、仇恨、喜怒哀樂等情緒,人類的生命太平淡了,女媧一想,猛然一拍腦袋,Shit!忘記給人類定義性別了,那怎麼辦?抹掉重來,然後就把人類重新洗牌,準備重新開始製造人類。由於先前的工作已經花費了很大的精力做為鋪墊,也不想從頭開始了,那先說人類(Product 產品類)怎麼改吧,
Time of Update: 2015-10-30
009 The Interfaces In JAVA(官網文檔翻譯),009interfacesInterfacesThere are a number of situations in software engineering when it is important for disparate groups of programmers to agree to a "contract" that spells out how their software interacts. Each
Time of Update: 2015-10-30
JAVA vo pojo javabean dto區別,pojojavabeanJavaBean 是一種JAVA語言寫成的可重用組件。為寫成JavaBean,類必須是具體的和公用的,並且具有無參數的構造器。JavaBean 通過提供符合一致性設計模式的公用方法將內部域暴露成員屬性。眾所周知,屬性名稱符合這種模式,其他Java 類可以通過自身機制發現和操作這些JavaBean 的屬性。VO即value
Time of Update: 2015-10-30
代碼類比實現十六進位轉二進位,十六進位二進位public class TowAdecimal{ private int sum;//用於轉換值 private static String s = "11";//十六進位的值 public static void main(String[] args){
Time of Update: 2015-10-30
Play Framework 完整實現一個APP(十二),frameworkapp 1.定製CRUD管理頁面> play crud:ov --layout 替換組建檔案內容 app/views/CRUD/layout.html #{extends 'admin.html' /}#{set 'moreStyles'} <link rel="stylesheet" type="text/css" media="screen"
Time of Update: 2015-10-30
從頭認識java-4.7 構造器初始化(2)這一章節我們接著上一章節的內容。(3)待用資料的初始化a.待用資料只會執行一次package com.ray.testobject;public class Test {private static Book book1 = new Book(1);private static Book book2 = new Book(2);public Test() {System.out.println(create
Time of Update: 2015-10-30
spring
Time of Update: 2015-10-30
Play Framework 完整實現一個APP(九),frameworkapp 添加增刪改查操作 1.開啟CRUD Module在/conf/application.conf 中添加# Import the crud modulemodule.crud=${play.path}/modules/crud 在/conf/routes 中添加# Import CRUD routes* /admin
Time of Update: 2015-10-30
Java記錄 -48-
Time of Update: 2015-10-30
從頭認識java-4.9 枚舉類型這一章節我們來簡單聊一下枚舉類型。1.枚舉類型是一種資料類型 package com.ray.ch04;public class Test {public static void main(String[] args) {MyType myType = MyType.ONE;System.out.println(myType instanceof Object);}}enum MyType {ONE, TWO, THREE}輸出: true&
Time of Update: 2015-10-30
Spring整合Junit testNGSpring專門為Junit testNG提供了一套測試整合介面類——AbstractSpringContextTests類,對於testNG就是其子類:AbstractTestNGSpringContextTests。Spring和testNG整合後,進行單元測試的時只要test類繼承該類,就可以方便的使用spring注入。實現了spring和testNG的無縫整合,我們可以像寫普通類那樣測試被spring IoC容器所管理的類(
Time of Update: 2015-10-30
從頭認識java-4.8 數組的初始化(2)-可變參數列表接著上一節,我們這一章節來聊一下數組的另外一個應用:可變參數列表1.可變參數列錶帶來的改變在沒有出現可變參數列表的時候,我們一般會使用數組來替代,但是有一個問題,每一次都需要先建立一個數組作為參數,不能動態形成數組作為參數。 package com.ray.ch04;public class Test {public static void printArray(Object[] objects) {for (int i = 0