在 jsp 中 引入 js 的時候最好使用成對的 <script> 標簽,否則有的瀏覽器無法識別 js 文件,比如 chrome。。。
2016-12-04
數據流動方向:數據庫-->SublistStudentDaoImpl--> StudentDao --> SublistStudentServiceImpl --> StudentService -- > View
2016-12-03
這里關系確實有點復雜,已經有點暈了。
首先兩個接口只有 StudentService 是對外開放的,StudentDao 還是被隱藏在內部;
通過在 StudentService 的實現類中實例化 StudentDao 的實現類來調用最里層的查詢方法;
那么在使用 StudentService 的時候,應該也是通過 StudentService 這個接口來實例化 SublistStudentServiceImpl 這個實現類,以完成最終的調用,這個被實例化的實現了 StudentService 接口的類,就是數據的最終出口。
首先兩個接口只有 StudentService 是對外開放的,StudentDao 還是被隱藏在內部;
通過在 StudentService 的實現類中實例化 StudentDao 的實現類來調用最里層的查詢方法;
那么在使用 StudentService 的時候,應該也是通過 StudentService 這個接口來實例化 SublistStudentServiceImpl 這個實現類,以完成最終的調用,這個被實例化的實現了 StudentService 接口的類,就是數據的最終出口。
2016-12-03