面試題整理,英文簡介、struts2功能,mybatis優點,jface概念,struts2元件,springmvc機制,配置事務,hiernate查詢方法

瓜瓜東西發表於2014-04-01

1 hibernate

s

2 自我介紹

Good morning, ladies and gentlemen! It is really my honorto have this opportunity for an interview. I hope I can make a good performancetoday. I'm confident that I can succeed. Now I will introduce myself briefly. Iam 26 years old, born in Shandong province. I graduated from QingdaoUniversity. My major is electronics. And I got my bachelor degree after mygraduation in the year of 2003. I spent most of my time on study, and I’vepassed CET-6 during my university. And I’ve acquired basic knowledge of my major.It is my long cherished dream to be an engineer and I am eager to get anopportunity to fully play my ability.

In July 2003, I began working for a small private companyas a technical support engineer in Qingdao city. Because there was no morechance for me to give full play to my talent, so I decided to change my job.And in August 2004, I left for Beijing and worked for a foreign enterprise asan automation software test engineer. Because I want to change my workingenvironment, I'd like to find a job which is more challenging. MoreoverMotorola is a global company, so I feel I can gain a lotfrom working in this kind of company. That is the reason why I come here tocompete for this position. I think I'm a good team player and a person of great honestyto others. AlsoI am able to work under great pressure.I am confident that I am qualified for the post of engineer in your company.

3 struts2

1 提供豐富的strtus2 標籤庫

2 提供異常處理機制

3 本身是mvc的一個模型

4 攔截器機制

4 mybatis 優點

1. sql寫在xml裡,便於統一管理和優化。

3. 解除sql與程式程式碼的耦合。

4. 提供對映標籤,支援物件與資料庫的orm欄位關係對映

5. 提供物件關係對映標籤,支援物件關係組建維護

6. 提供xml標籤,支援編寫動態sql。

5 mybatis的流程 載入配置,解析sql,執行sql

6 jface的概念

JFace是建立在SWT之上的UI部件,是Eclipse組織為了開發Eclipse IDE環境所編寫的一組底層圖形介面 API,其底層實現為SWT。它擴充套件了 SWT並能與 SWT 互動操作。JFace工具箱提供了一組功能強大的使用者介面元件,開發人員可以輕鬆地在獨立應用程式中利用這些元件,以簡化常見的UI程式設計任務。

7webservice

用於分散式的互操作的應用程式---製作實力,一個服務用來計算加減乘除

8 struts2 的元件

Struts 2框架本身大致可以分為3個部分:

核心控制器FilterDispatcher業務控制器Action使用者實現的企業業務邏輯元件

 

核心控制器FilterDispatcher是Struts 2框架的基礎,

包含了框架內部的控制流程和處理機制。

業務控制器Action和業務邏輯元件是需要使用者來自己實現的。

使用者在開發Action和業務邏輯元件的同時,還需要編寫相關的配置檔案,

供核心控制器FilterDispatcher來使用。

全域性結果和生命式事務。

9 Spring框架的工作機制是什麼?

(1) SpringMVC將所有的請求都提交給DispatcherServlet,它會委託應用系統的其它模組負責對請求進行真正的處理工作。

(2) DispatcherServlet查詢一個或多個HandlerMapping,找到處理請求的Controller。

(3) DispatcherServlet請請求提交到目標Controller。

(4) Controller進行業務邏輯處理後,會返回一個ModelAndView。

(5) Dispathcher查詢一個或多個ViewResolver(檢視解析器),找到ModelAndView物件指定的檢視物件。

(6) 檢視物件負責將結果返回給客戶端。

10怎麼使用Spring配置事務 ?

    Spring同時支援程式設計式事務策略和宣告式事務策略,大部分時候都採用宣告式事務策略。

宣告式事務管理的配置方式,通常有以下4種:

(1) 使用TransactionProxyFactoryBean為目標Bean生成事務代理的配置。此方式是最傳統、配置檔案最臃腫、最難以閱讀的方式。

(2) 採用Bean繼承的事務代理配置方式,比較簡潔,但依然是增量式配置。

(3) 採用BeanNameAutoProxyCreator,根據Bean Name自動生成事務代理的方式。這是直接利用Spring的AOP框架配置事務代理的方式,需要對Spring的AOP框架有所理解。但這種方式避免了增量式配置,效果非常不錯。

(4) 採用DefaultAdvisorAutoProxyCreator,直接利用Spring的AOP框架配置事務代理的方式,效果非常不錯,只是這種配置方式的可讀性不如第3種方式。

11 . Hibernate有哪幾種查詢資料的方式

3種:hql、條件查詢QBC(Query By Criteria)、原生sql (通過createSQLQuery建立)

 

相關文章