第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

無法運行起來

其中數據庫配置

<table?tableName="dw_admin"?domainObjectName="AdminDO"?enableCountByExample="false"
?enableSelectByExample="false"?enableUpdateByExample="false"?enableDeleteByExample="false"
?selectByExampleQueryId="false"></table>

????java代碼

@SpringBootApplication(scanBasePackages?=?{"com.miaoshaproject"})
@RestController
@MapperScan("com.miaoshaproject.dao")
public?class?App
{
????@Autowired
????private?AdminDOMapper?adminDOMapper;


????@RequestMapping("/")
????public?String?home(){
????????AdminDO?adminDO?=?adminDOMapper.selectByPrimaryKey(1);

????????if?(adminDO?==?null){
????????????return?"Hello?world?!";
????????}
????????else{
????????????return?adminDO.getUserName();
????????}
????}

????public?static?void?main(?String[]?args?)?{
????????System.out.println(?"Hello?World!"?);
????????SpringApplication.run(App.class,?args);
????}
}

啟動報錯

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'app': Unsatisfied dependency expressed through field 'adminDOMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'adminDOMapper' defined in file [/Users/pro/Desktop/java_project/target/classes/com/miaoshaproject/dao/AdminDOMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [/Users/pro/Desktop/java_project/target/classes/mapping/AdminDOMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.miaoshaproject.dao.AdminDOMapper.BaseResultMap


正在回答

2 回答

我也有這個問題 一模一樣

0 回復 有任何疑惑可以回復我~

刪掉生成的文件,重新執(zhí)行

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

無法運行起來

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號