主键生成策略
@Id @GeneratedValue(strategy = GenerationType.IDENTITY, generator="SELECT F_DEMO_SEQ.NEXTVAL FROM DUAL") private Long id;
MapperScannerConfigurer
<bean class="tk.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="com.wjz.mapper"/> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/> <property name="properties"> <value> mappers=tk.mybatis.mapper.common.Mapper ORDER=BEFORE </value> </property> </bean>
原文地址:https://www.cnblogs.com/BINGJJFLY/p/8947378.html
时间: 2024-11-11 16:11:59