为了账号安全,请及时绑定邮箱和手机立即绑定

项目启动报错

2018-03-08 21:09:20.334 ERROR 7784 --- [           main] o.s.boot.SpringApplication               : Application startup failed


java.lang.IllegalArgumentException: At least one base package must be specified

at org.springframework.util.Assert.notEmpty(Assert.java:228) ~[spring-core-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:269) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:163) ~[mybatis-spring-1.3.1.jar:1.3.1]

at org.mybatis.spring.annotation.MapperScannerRegistrar.registerBeanDefinitions(MapperScannerRegistrar.java:104) ~[mybatis-spring-1.3.1.jar:1.3.1]

at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:359) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:143) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:320) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:92) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]

at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]

at com.example.demo.FirstSBdemoApplication.main(FirstSBdemoApplication.java:10) [classes/:na]


正在回答

3 回答

同学请与原正确的项目比对一下

https://gitee.com/xiangze/areadisplay
https://gitee.com/xiangze/demo

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

你好,我估计你的报错是因为没有添加局域性的@Mapper或者是全局性的@MapperScan.两者选其中之一就可以了.我只是猜测,根据自己的项目进行判断

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

我也是报这个问题  

0 回复 有任何疑惑可以回复我~
#1

qq_小丑_134

你好,我估计你的报错是因为没有添加局域性的@Mapper或者是全局性的@MapperScan.两者选其中之一就可以了.我只是猜测,根据自己的项目进行判断
2018-06-03 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

项目启动报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信