採用「最適技術、持續最佳實踐」原則構建的企業級快速開發框架 quick4j,原始碼:GitHub。
src/main/java Java 原始碼 src/main/resources 設定檔、MyBatis XML、屬性檔 src/main/webapp Web 根目錄 (JSP/靜態資源) src/test/java 測試碼 pom.xml Maven 設定
${spring.version} 等)。filtering=true 支援屬性檔佔位符。ContextLoaderListener 載入 applicationContext*.xml 与 applicationContext-shiro.xml。CharacterEncodingFilter 強制 UTF-8。DelegatingFilterProxy 代理 shiroFilter。DispatcherServlet 攔截 /rest/*,效能最佳。component-scan 掃描 com.eliteams.quick4j。application.properties。SqlSessionFactoryBean 掃描 Mapper XML。REQUIRED 回滾;select/count read-only=true 提升查詢效能。proxy-target-class=true) + @Transactional 支援。ShiroFilterFactoryBean 定義 filterChainDefinitions:靜態資源 anon、登入頁 anon、其餘 authc。securityRealm 負責認證授權。cacheEnabled=true、延遲載入 lazyLoadingEnabled=true、駝峰映射 mapUnderscoreToCamelCase=true。PaginationStatementHandlerInterceptor + PaginationResultSetHandlerInterceptor。mvc:annotation-driven 整合 Hibernate Validator。MappingJacksonHttpMessageConverter 解決 IE 下載 JSON 問題。InternalResourceViewResolver 前綴 /WEB-INF/views/ 後綴 .jsp。CommonsMultipartResolver 檔案上傳支援 10GB。AuthorizationAttributeSourceAdvisor。quick4j.sql 建立 user/role/permission 三表與關聯表,預設 admin/starzou 密碼 123456 (SHA-256)。
application.properties 連線資訊。/rest/index 進入首頁。此架構兼顧開發效率與執行效能,歡迎 Fork 貢獻 PR,共同打造更好的 Java Web 脚手架。