William's 秘密基地
一些有的沒有都會放在這邊!!! 也有學習的筆記!!!
2016年10月20日 星期四
[Tomcat]解決 tomcat 無法進入 Server Status / Manager App / Host Manager 的狀況
[Tomcat]解決 tomcat 無法進入 Server Status / Manager App / Host Manager 的狀況
修改 tomcat-users.xml 的資訊,位於Tomcat安裝目錄下的conf目錄中
將相關 rolename 及 user 資訊加入
修改範例如下
2016年9月13日 星期二
[JasperReport] JasperReport 報表設計套用 command 模式
[JasperReport] JasperReport 報表設計套用 command 模式
預設報表須輸出 pdf,ods 兩種格式
需要
CommandProcessor interface
Command interface
設定 Processor 可以執行的 command,假設有三種
InputModel 為從前端 controller 所傳遞過來的屬性or資料
public interface CommandProcessor {
String TO_FILE = "toFile";
String TO_STREAM = "toStream";
String TO_BYTE_ARRAY = "toByteArray";
genReportToFile(InputModel inputModel)
genReportToStream(InputModel inputModel)
genReportToByteArray(InputModel inputModel)
}
閱讀更多 »
2016年9月8日 星期四
[Spring] Annotation @Transactional 的各項 屬性
[Spring] Annotation @Transactional 的各項 屬性
用 spring 事務管理器,由spring來負責資料庫的打開,提交,回滾.
默認遇到運行期例外
(throw new RuntimeException();)會回滾:
閱讀更多 »
[Java] Listener 簡易說明
[Java] Listener 簡易說明
相關類別
org.springframework.context.ApplicationEventPublisher
org.springframework.context.ApplicationEventPublisherAware
org.springframework.context.ApplicationEvent
org.springframework.context.ApplicationListener
閱讀更多 »
2016年3月3日 星期四
[JAVA]轉換檔案編碼及內容亂碼轉換
[JAVA]轉換檔案編碼
分享三種方式
使用String 轉換
-------
package
charset;
import
java.io.File;
import
java.io.FileInputStream;
import
java.io.FileOutputStream;
import
java.io.IOException;
import
java.io.InputStream;
import
java.io.InputStreamReader;
import
java.io.OutputStreamWriter;
閱讀更多 »
較新的文章
較舊的文章
首頁
訂閱:
文章 ( Atom )