initialsize(initial size中文翻譯,initial size是什么意思,initial size發(fā)音、用法及例句)
- 內容導航:
- 1、initial size
- 2、Spring與Mybatis的整合方法有哪些
1、initial size
initial size發(fā)音
英: 美:
initial size中文意思翻譯
常用釋義:初始尺寸
初始大小
initial size雙語(yǔ)使用場(chǎng)景
1、Heap tuning involves two parameters: the initial size of the heap and its maximum size.───堆調優(yōu)涉及兩個(gè)參數:堆的初始大小和最大大小。
2、Every group starts with an initial size and it may vary at runtime depending upon the runtime load and the autopilot setup.───每個(gè)組具有初始規模,在運行時(shí)規??赡茈S運行時(shí)負載和自動(dòng)引導設置變化。
3、However, if the database is not supposed to expand beyond its initial size, set the maximum growth size of the database to zero.───然而,如果假定不使數據庫增長(cháng)到超過(guò)其初始值,請將數據庫增長(cháng)的最大值設置為零。
4、Array declared as for loop control variable cannot be declared with an initial size.───聲明用于循環(huán)控制變量的數組時(shí)不能使用初始大小的值。
5、It has an initial size and a growth parameter.───它有一個(gè)初始的大小和一個(gè)增長(cháng)參數。
6、InitialSize is the initial size of the cache.───initialSize是緩存的初始大小。
7、It's a balance of reducing the initial size of your application download vs. the convenience of working totally in an offline environment.───需要對減少應用程序下載內容的初始大小和完全在脫機環(huán)境下工作的便利性之前權衡。
8、This large size may represent the initial size of the fiber before secondary-wall deposition or fiber desiccation upon boll opening.───這個(gè)大小可以代表第二層殼沉積或棉桃開(kāi)裂干涸前棉纖維本來(lái)的大小。
9、Xmns sets the initial size of the nursery to the specified value.───Xmns將托兒所區域的初始大小設置為指定的值。
initial size相似詞語(yǔ)短語(yǔ)
1、initial conditions───初始參數;輸入條件;初始[原始]條件,輸入條件,原始數據,初參數
2、initial d───頭文字D(動(dòng)漫名);[**]頭文字D
3、Initial Rings───初始環(huán)
4、full initial───全名首字母
5、initial cost───最初成本,[會(huì )計]開(kāi)辦成本
6、shared initial───共享首字母
7、initial───n.詞首大寫(xiě)字母;原始細胞;adj.最初的;字首的;vt.用姓名的首字母簽名
8、size───adj.一定尺寸的;n.大??;尺寸;vi.可比擬;vt.依大小排列
9、initial beauty───最初的美麗
2、Spring與Mybatis的整合方法有哪些
1、采用數據映射器(MapperFactoryBean)的方式,不用寫(xiě)mybatis映射文件,采用注解方式提供相應的sql語(yǔ)句和輸入參數。
(1)Spring配置文件:
(2)數據映射器UserMapper,代碼如下:
public interface UserMapper {
@Select("SELECT * FROM user WHERE id = #{userId}")
User getUser(@Param("userId") long id);
}
(3) dao接口類(lèi)UserDao,代碼如下:
public interface UserDao {
public User getUserById(User user);
}
(4)dao實(shí)現類(lèi)UserDaoImpl2,,代碼如下:
public class UserDaoImpl2 implements UserDao {
private UserMapper userMapper;
public void setUserMapper(UserMapper userMapper) {
this.userMapper = userMapper;
}
public User getUserById(User user) {
return userMapper.getUser(user.getId());
}
}
2、采用接口org.apache.ibatis.session.SqlSession的實(shí)現類(lèi)org.mybatis.spring.SqlSessionTemplate。
mybatis中, sessionFactory可由SqlSessionFactoryBuilder.來(lái)創(chuàng )建。MyBatis-Spring 中,使用了SqlSessionFactoryBean來(lái)替代。SqlSessionFactoryBean有一個(gè)必須屬性dataSource,另外其還有一個(gè)通用屬性configLocation(用來(lái)指定mybatis的xml配置文件路徑)。
(1)Spring配置文件:
-->
(2)mybatis總配置文件sqlMapConfig.xml:
(3)實(shí)體類(lèi)映射文件user.map.xml:
select * from user where id = #{id}
(4)dao層接口實(shí)現類(lèi)UserDaoImpl:
public class UserDaoImpl implements UserDao {
public SqlSessionTemplate sqlSession;
public User getUserById(User user) {
return (User)sqlSession.selectOne("com.xxt.ibatis.dbcp.domain.User.getUser", user);
}
public void setSqlSession(SqlSessionTemplate sqlSession) {
this.sqlSession = sqlSession;
}
}
3、采用抽象類(lèi)org.mybatis.spring.support.SqlSessionDaoSupport提供SqlSession。
(1)spring配置文件:
(2) dao層接口實(shí)現類(lèi)UserDaoImpl3:
public class UserDaoImpl3 extends SqlSessionDaoSupport implements UserDao {
public User getUserById(User user) {
return (User) getSqlSession().selectOne("com.xxt.ibatis.dbcp.domain.User.getUser", user);
}
}
版權聲明: 本站僅提供信息存儲空間服務(wù),旨在傳遞更多信息,不擁有所有權,不承擔相關(guān)法律責任,不代表本網(wǎng)贊同其觀(guān)點(diǎn)和對其真實(shí)性負責。如因作品內容、版權和其它問(wèn)題需要同本網(wǎng)聯(lián)系的,請發(fā)送郵件至 舉報,一經(jīng)查實(shí),本站將立刻刪除。