spring4.2.5+hibernate5.2.7 配置出错,求各位大神解惑 5C

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [viewspace-dao.xml]: Invocation of init method failed;
nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]

3个回答

图片说明
图片说明
图片说明

应该是jar包冲突的问题,删除jar包 重新配置下

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
spring4.2.5+hibernate5.2.7 配置出错,求各位大神解惑

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [viewspace-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]

spring4.2.5+hibernate5.0.2问题,求各位大神解惑

Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate5.localSessionFactoryBean] for bean with name 'sessionFactory' defined in class path resource [applicationContext-dao.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.orm.hibernate5.localSessionFactoryBean

Spring4.2.5+mybatis3.2.7+dubbo2.8.4项目运行卡住了

![图片说明](https://img-ask.csdn.net/upload/201812/18/1545136663_4879.png) 项目运行到箭头指向的地方不动了,没有报错

spring 整合mybatis 出错,求解决

2017-09-24 21:59:58 [DEBUG] - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor' 2017-09-24 21:59:58 [DEBUG] - Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0' 2017-09-24 21:59:58 [DEBUG] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. 2017-09-24 21:59:58 [DEBUG] - Eagerly caching bean 'sqlSessionFactory' to allow for resolving potential circular references 2017-09-24 21:59:58 [DEBUG] - Returning cached instance of singleton bean 'dataSource' 2017-09-24 21:59:58 [DEBUG] - Resolved classpath location [mapper/] to resources [URL [file:/H:/Project/apache-tomcat-8.0.32-windows-x64/apache-tomcat-8.0.32/webapps/wisdomrest/WEB-INF/classes/mapper/]] 2017-09-24 21:59:58 [DEBUG] - Looking for matching resources in directory tree [H:\Project\apache-tomcat-8.0.32-windows-x64\apache-tomcat-8.0.32\webapps\wisdomrest\WEB-INF\classes\mapper] 2017-09-24 21:59:58 [DEBUG] - Searching directory [H:\Project\apache-tomcat-8.0.32-windows-x64\apache-tomcat-8.0.32\webapps\wisdomrest\WEB-INF\classes\mapper] for files matching pattern [H:/Project/apache-tomcat-8.0.32-windows-x64/apache-tomcat-8.0.32/webapps/wisdomrest/WEB-INF/classes/mapper/**/*Mapper.xml] 2017-09-24 21:59:58 [DEBUG] - Searching directory [H:\Project\apache-tomcat-8.0.32-windows-x64\apache-tomcat-8.0.32\webapps\wisdomrest\WEB-INF\classes\mapper\menu] for files matching pattern [H:/Project/apache-tomcat-8.0.32-windows-x64/apache-tomcat-8.0.32/webapps/wisdomrest/WEB-INF/classes/mapper/**/*Mapper.xml] 2017-09-24 21:59:58 [DEBUG] - Resolved location pattern [classpath*:mapper/**/*Mapper.xml] to resources [file [H:\Project\apache-tomcat-8.0.32-windows-x64\apache-tomcat-8.0.32\webapps\wisdomrest\WEB-INF\classes\mapper\menu\menuMapper.xml]] 2017-09-24 21:59:58 [DEBUG] - Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory' 2017-09-24 21:59:58 [DEBUG] - Parsed configuration file: 'class path resource [config/mybatis-config.xml]' 2017-09-24 21:59:58 [WARN] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext-db.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [H:\Project\apache-tomcat-8.0.32-windows-x64\apache-tomcat-8.0.32\webapps\wisdomrest\WEB-INF\classes\mapper\menu\menuMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.wisdom.menu.model.Menu'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.wisdom.menu.model.Menu 2017-09-24 21:59:58 [DEBUG] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4719ac62: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,propertiesConfiguration,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,sqlSessionTemplate,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.config.internalTransactionalEventListenerFactory,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager,txAdvice,serviceMethods,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor]; root of factory hierarchy 2017-09-24 21:59:58 [DEBUG] - Invoking destroy method 'close' on bean with name 'dataSource' 2017-09-24 21:59:58 [DEBUG] - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=1b617js9q1dzucff1r9hwem|5af7da9,name=1b617js9q1dzucff1r9hwem|5af7da9 unregistered. 2017-09-24 21:59:58 [DEBUG] - C3P0Registry mbean unregistered. 2017-09-24 21:59:58 [ERROR] - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext-db.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [H:\Project\apache-tomcat-8.0.32-windows-x64\apache-tomcat-8.0.32\webapps\wisdomrest\WEB-INF\classes\mapper\menu\menuMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.wisdom.menu.model.Menu'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.wisdom.menu.model.Menu at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:753) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [catalina.jar:8.0.32] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [catalina.jar:8.0.32] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [catalina.jar:8.0.32] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [catalina.jar:8.0.32] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [catalina.jar:8.0.32] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_74] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_74] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_74] at java.lang.Thread.run(Unknown Source) [na:1.8.0_74]

SpringMVC3.2+hibernate4.2.5 多数据库注解 找不到实体问题

下面我只粘主要的配置文件和实体 applicationContext.xml <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:hsm-db-dchsqlserver.properties</value> <value>classpath:hsm-db-drhsqlserver.properties</value> </list> </property> </bean> <import resource="db-dch.xml" /> <import resource="db-drh.xml" /> 资源文件就不贴了,资源文件主要配置数据库驱动连接等相关配置 db-dch.xml ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683458_426800.png) ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683433_468361.png) ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683482_414961.png) db-drh.xml ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683619_647886.png) ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683631_436180.png) ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683683_883648.png) 两个数据库都有一个Employee的表,所以这里我分开两个实体 DCHEmployeeEntity ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683700_464099.png) DRHEmployeeEntity ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683710_847204.png) DAO也分两个 DCHEmployeeDAO ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683694_848628.png) DRHEmployeeDAO ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683747_220630.png) 目录结构 ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683756_255356.png) 控制类,项目访问 import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.dch.projects.dch.employee.entity.DCHEmployeeEntity; import com.dch.projects.dch.employee.service.IDCHEmployeeService; import com.dch.projects.drh.employee.entity.DRHEmployeeEntity; import com.dch.projects.drh.employee.service.IDRHEmployeeService; import com.dch.projects.oms.user.entity.UserEntity; import com.dch.projects.oms.user.service.IUserService; @Controller @RequestMapping("/") public class IndexController { @Autowired private IUserService userService; @Autowired private IDCHEmployeeService dchEmployeeService; @Autowired private IDRHEmployeeService drhEmployeeService; @RequestMapping("/main") public ModelAndView main(HttpServletRequest request) { List<UserEntity> listUsers=this.userService.getAllUsersByHql("from UserEntity"); for(UserEntity user:listUsers){ System.out.println(user.getName()); } List<DCHEmployeeEntity> listDCHEmployees=this.dchEmployeeService.getAllDCHEmployeesByHql("from DCHEmployeeEntity"); for(DCHEmployeeEntity employee:listDCHEmployees){ System.out.println("德诚行:"+employee.getEmpNo()+" "+employee.getEmpName()); } List<DRHEmployeeEntity> listDRHEmployees=this.drhEmployeeService.getAllDRHEmployeesByHql("from DRHEmployeeEntity"); for(DRHEmployeeEntity employee:listDRHEmployees){ System.out.println("德瑞行:"+employee.getEmpNo()+" "+employee.getEmpName()); } return new ModelAndView("index/main"); } } 后台错误 ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683806_403295.png) ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683774_999026.png) 页面错误,都一样 ![图片说明](https://img-ask.csdn.net/upload/201501/08/1420683824_221980.png) DCHEmployee这个能查出数据,就是DRHEmployee报错,配置那里看来看去都没什么问题,除了table的名字是一样,但如果我使用hibernate配置文件配置实体而不用注解的话是没问题,使用注解就出现这问题。 哪位大神帮看下问题出在哪里,谢谢了。

springframework4.2怎么配置log4j2

log4j2已经配置成功 通过代码可以输出日志文件. 怎么配置才能让springframework4.2的日志也能输出

springBoot整合mybatis时的错,求助!

项目结构![图片说明](https://img-ask.csdn.net/upload/201903/15/1552617152_885756.png) yml配置 ``` spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://localhost:3306/zmz username: root password: root mybatis: typeAliasesPackage: Beans mapperLocations: classpath:mappers/*.xml logging: level: mapper: debug ``` 报错信息 ``` java.lang.IllegalStateException: Could not evaluate condition on com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure#dataSource due to org/springframework/boot/web/servlet/ServletRegistrationBean not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake) at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:55) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:178) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:140) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:333) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at start.Start.main(Start.java:12) [classes/:na] Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/web/servlet/ServletRegistrationBean at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_144] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_144] at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_144] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:567) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:683) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:627) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:597) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1445) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:975) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:289) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanType(BeanTypeRegistry.java:278) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:259) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:182) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:171) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:139) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:113) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-1.3.3.RELEASE.jar:1.3.3.RELEASE] ... 17 common frames omitted Caused by: java.lang.ClassNotFoundException: org.springframework.boot.web.servlet.ServletRegistrationBean at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_144] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_144] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_144] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_144] ... 37 common frames omitted 2019-03-15 10:27:17.852 INFO 3600 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/resources.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/rt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/jsse.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/jce.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/charsets.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/jfr.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/access-bridge-64.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/cldrdata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/dnsns.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/jaccess.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/jfxrt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/localedata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/nashorn.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/sunec.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/sunjce_provider.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/sunmscapi.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/sunpkcs11.jar, file:/C:/Program%20Files/Java/jdk1.8.0_144/jre/lib/ext/zipfs.jar, file:/D:/software/workspace/spb/target/classes/, file:/D:/software/repo/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar, file:/D:/software/repo/org/springframework/boot/spring-boot-starter-web/1.3.3.RELEASE/spring-boot-starter-web-1.3.3.RELEASE.jar, file:/D:/software/repo/org/springframework/boot/spring-boot-starter/1.3.3.RELEASE/spring-boot-starter-1.3.3.RELEASE.jar, file:/D:/software/repo/org/springframework/boot/spring-boot/1.3.3.RELEASE/spring-boot-1.3.3.RELEASE.jar, file:/D:/software/repo/org/springframework/boot/spring-boot-starter-logging/1.3.3.RELEASE/spring-boot-starter-logging-1.3.3.RELEASE.jar, file:/D:/software/repo/ch/qos/logback/logback-classic/1.1.5/logback-classic-1.1.5.jar, file:/D:/software/repo/ch/qos/logback/logback-core/1.1.5/logback-core-1.1.5.jar, file:/D:/software/repo/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.jar, file:/D:/software/repo/org/slf4j/jcl-over-slf4j/1.7.16/jcl-over-slf4j-1.7.16.jar, file:/D:/software/repo/org/slf4j/jul-to-slf4j/1.7.16/jul-to-slf4j-1.7.16.jar, file:/D:/software/repo/org/slf4j/log4j-over-slf4j/1.7.16/log4j-over-slf4j-1.7.16.jar, file:/D:/software/repo/org/springframework/spring-core/4.2.5.RELEASE/spring-core-4.2.5.RELEASE.jar, file:/D:/software/repo/org/yaml/snakeyaml/1.16/snakeyaml-1.16.jar, file:/D:/software/repo/org/springframework/boot/spring-boot-starter-tomcat/1.3.3.RELEASE/spring-boot-starter-tomcat-1.3.3.RELEASE.jar, file:/D:/software/repo/org/apache/tomcat/embed/tomcat-embed-core/8.0.32/tomcat-embed-core-8.0.32.jar, file:/D:/software/repo/org/apache/tomcat/embed/tomcat-embed-el/8.0.32/tomcat-embed-el-8.0.32.jar, file:/D:/software/repo/org/apache/tomcat/embed/tomcat-embed-logging-juli/8.0.32/tomcat-embed-logging-juli-8.0.32.jar, file:/D:/software/repo/org/apache/tomcat/embed/tomcat-embed-websocket/8.0.32/tomcat-embed-websocket-8.0.32.jar, file:/D:/software/repo/org/springframework/boot/spring-boot-starter-validation/1.3.3.RELEASE/spring-boot-starter-validation-1.3.3.RELEASE.jar, file:/D:/software/repo/org/hibernate/hibernate-validator/5.2.4.Final/hibernate-validator-5.2.4.Final.jar, file:/D:/software/repo/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar, file:/D:/software/repo/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar, file:/D:/software/repo/com/fasterxml/classmate/1.1.0/classmate-1.1.0.jar, file:/D:/software/repo/com/fasterxml/jackson/core/jackson-databind/2.6.5/jackson-databind-2.6.5.jar, file:/D:/software/repo/com/fasterxml/jackson/core/jackson-annotations/2.6.5/jackson-annotations-2.6.5.jar, file:/D:/software/repo/com/fasterxml/jackson/core/jackson-core/2.6.5/jackson-core-2.6.5.jar, file:/D:/software/repo/org/springframework/spring-web/4.2.5.RELEASE/spring-web-4.2.5.RELEASE.jar, file:/D:/software/repo/org/springframework/spring-aop/4.2.5.RELEASE/spring-aop-4.2.5.RELEASE.jar, file:/D:/software/repo/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/D:/software/repo/org/springframework/spring-beans/4.2.5.RELEASE/spring-beans-4.2.5.RELEASE.jar, file:/D:/software/repo/org/springframework/spring-context/4.2.5.RELEASE/spring-context-4.2.5.RELEASE.jar, file:/D:/software/repo/org/springframework/spring-webmvc/4.2.5.RELEASE/spring-webmvc-4.2.5.RELEASE.jar, file:/D:/software/repo/org/springframework/spring-expression/4.2.5.RELEASE/spring-expression-4.2.5.RELEASE.jar, file:/D:/software/repo/org/mybatis/spring/boot/mybatis-spring-boot-starter/1.3.0/mybatis-spring-boot-starter-1.3.0.jar, file:/D:/software/repo/org/springframework/boot/spring-boot-starter-jdbc/1.3.3.RELEASE/spring-boot-starter-jdbc-1.3.3.RELEASE.jar, file:/D:/software/repo/org/apache/tomcat/tomcat-jdbc/8.0.32/tomcat-jdbc-8.0.32.jar, file:/D:/software/repo/org/apache/tomcat/tomcat-juli/8.0.32/tomcat-juli-8.0.32.jar, file:/D:/software/repo/org/springframework/spring-jdbc/4.2.5.RELEASE/spring-jdbc-4.2.5.RELEASE.jar, file:/D:/software/repo/org/springframework/spring-tx/4.2.5.RELEASE/spring-tx-4.2.5.RELEASE.jar, file:/D:/software/repo/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/1.3.0/mybatis-spring-boot-autoconfigure-1.3.0.jar, file:/D:/software/repo/org/mybatis/mybatis/3.4.4/mybatis-3.4.4.jar, file:/D:/software/repo/org/mybatis/mybatis-spring/1.3.1/mybatis-spring-1.3.1.jar, file:/D:/software/repo/com/alibaba/druid-spring-boot-starter/1.1.0/druid-spring-boot-starter-1.1.0.jar, file:/D:/software/repo/com/alibaba/druid/1.1.0/druid-1.1.0.jar, file:/D:/software/repo/org/springframework/boot/spring-boot-autoconfigure/1.3.3.RELEASE/spring-boot-autoconfigure-1.3.3.RELEASE.jar] ```

spring boot + jpa访问数据库时报这个错,调用CrudRepository保存的时候

java.lang.NullPointerException: null at com.yd.cn.controller.SampleController.hello(SampleController.java:26) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-websocket.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:237) ~[spring-boot-actuator-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:112) ~[spring-boot-actuator-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:103) ~[spring-boot-actuator-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[catalina.jar:8.5.11] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[catalina.jar:8.5.11] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.11] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [catalina.jar:8.5.11] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.11] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.5.11] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.11] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [catalina.jar:8.5.11] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-coyote.jar:8.5.11] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.11] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-coyote.jar:8.5.11] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-coyote.jar:8.5.11] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.11] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.11] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102] ![图片说明](https://img-ask.csdn.net/upload/201708/22/1503380371_349769.png)![![图片说明](https://img-ask.csdn.net/upload/201708/22/1503380520_871584.png)图片说明](https://img-ask.csdn.net/upload/201708/22/1503380462_232925.png)

spring-security-4.0,重启服务后,post请求提示无权限

这个问题困扰我好久了,配置了Spring4.2.5+Spring security4.0(集成了cas)之后,采用Spring mvc框架,服务启动之后,访问服务时,如果第一个请求是Post请求,都返回403错误,跳转到指定的无权限页面,get请求就可以正常访问。打个比方就是我打开一个查询页面,按照查询条件查询了一些数据,这就等于是做了一次post请求,然后我关闭服务再重启,重启之后,我在刚才的查询页面按F5刷新,就跳转到了403页面。。。如果在浏览器地址栏中敲回车则能访问到查询页面。。。求大神帮忙解决。 applicationContext-security-cas.xml代码如下: ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:sec="http://www.springframework.org/schema/security" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd"> <!-- 浏览权限设定,根据自己的情况修改 --> <sec:http auto-config="true" use-expressions="true" disable-url-rewriting="true" entry-point-ref="casProcessingFilterEntryPoint"> <sec:anonymous enabled="false" /> <sec:intercept-url pattern="/**/*.jsp" access="isAuthenticated()" /> <sec:intercept-url pattern="/**/*.do" access="isAuthenticated()" /> <sec:intercept-url pattern="/**/*.html" access="isAuthenticated()" /> <sec:intercept-url pattern="/**/*.htm" access="isAuthenticated()" /> <sec:custom-filter position="CAS_FILTER" ref="casAuthenticationFilter" /> <sec:logout logout-success-url="${cas-server-url}/logout?service=${cas-service-url}" /> <sec:custom-filter ref="requestSingleLogoutFilter" before="LOGOUT_FILTER" /> <sec:custom-filter ref="singleLogoutFilter" before="CAS_FILTER" /> <sec:session-management invalid-session-url=""> <sec:concurrency-control max-sessions="1" error-if-maximum-exceeded="false" expired-url="/common/timeout.jsp" /> </sec:session-management> </sec:http> <!-- This filter handles a Single Logout Request from the CAS Server --> <bean id="singleLogoutFilter" class="org.jasig.cas.client.session.SingleSignOutFilter" /> <!-- This filter redirects to the CAS Server to signal Single Logout should be performed --> <bean id="requestSingleLogoutFilter" class="org.springframework.security.web.authentication.logout.LogoutFilter"> <constructor-arg value="${cas-server-url}/logout?service=${cas-service-url}" /> <constructor-arg> <bean class="org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler" /> </constructor-arg> <property name="filterProcessesUrl" value="/logout" /> </bean> <sec:authentication-manager alias="authenticationManager"> <sec:authentication-provider ref="casAuthenticationProvider" /> </sec:authentication-manager> <bean id="casAuthenticationFilter" class="org.springframework.security.cas.web.CasAuthenticationFilter"> <property name="authenticationManager" ref="authenticationManager" /> </bean> <bean id="casProcessingFilterEntryPoint" class="org.springframework.security.cas.web.CasAuthenticationEntryPoint"> <!-- 单点登录服务器登录URL --> <property name="loginUrl" value="${cas-server-url}/login" /> <property name="serviceProperties" ref="serviceProperties" /> </bean> <bean id="casAuthenticationProvider" class="org.springframework.security.cas.authentication.CasAuthenticationProvider"> <property name="authenticationUserDetailsService"> <bean class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper"> <constructor-arg ref="loginServiceImpl" /> </bean> </property> <property name="serviceProperties" ref="serviceProperties" /> <property name="ticketValidator"> <bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator"> <constructor-arg index="0" value="${cas-server-url}" /> </bean> </property> <property name="key" value="an_id_for_this_auth_provider_only" /> </bean> <bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties"> <property name="service" value="${cas-service-url}/login/cas" /> <property name="sendRenew" value="true" /> </bean> </beans> ``` Controller代码如下: ``` @RequestMapping(value = "/findDevice", method = { RequestMethod.POST, RequestMethod.GET })// public ModelAndView findDevice(HttpServletRequest request, String deviceName, String deviceNO) throws AppException { /** * 获取页面查询标志位,如果flag.equals("query") == true,则封装查询条件。 */ String flag = request.getParameter("flag"); // 封装查询条件 Map<String, String> map = new HashMap<String, String>(); if (null != flag && "query".equals(flag)) { map.put("deviceName", deviceName); map.put("deviceNO", deviceNO); } // 分页框架,该代码后的第一个查询接口会被执行分页操作 PageHelper.startPage(this.getPageNum(request), this.getPageSize(request)); // 查询资产集合 List<DeviceDTO> deviceDTOList = this.deviceServiceImpl .findAllDeviceList(map); // 初始化分页数据 PageInfo<DeviceDTO> pagehelper = new PageInfo<DeviceDTO>(deviceDTOList); // 封装页面所需数据 ModelAndView modelAndView = new ModelAndView(); modelAndView.addObject("pagehelper", pagehelper); modelAndView.addObject("deviceName", deviceName); modelAndView.addObject("deviceNO", deviceNO); modelAndView.setViewName("jb/sbgla/device/findDevice"); return modelAndView; } ```

关于一个dubbo项目,zookeeper和spring-boot的bean的问题,详细情况下面说明

是这样的:一开始运行的好好的,但是中途我安装了一个wifi共享精灵,就会报出如下错误,之后卸载掉又会恢复正常,这是为什呢? 异常情况如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderController' defined in file [C:\Users\shengcl\Documents\workspace-sts-3.7.3.RELEASE\P160309\ouyeel\ouyeel-web-protal\target\classes\com\ouyeel\controller\OrderController.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanInitializationException: Failed to init remote service reference at filed cmsOrderService in class com.ouyeel.controller.OrderController; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.ouyeel.order.service.CmsOrderService. No provider available for the service com.ouyeel.order.service.CmsOrderService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=xplat-seed-consumer&check=false&dubbo=2.8.4&generic=false&interface=com.ouyeel.order.service.CmsOrderService&methods=create,findAll&organization=dubbox&owner=kk580kk&pid=5624&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1461047607234 to the consumer 192.168.23.1 use dubbo version 2.8.4 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:11

Spring-data-redis我在注入redisTemplate报错是不是SPring的版本不对

![图片说明](https://img-ask.csdn.net/upload/201803/11/1520762488_868096.png) **,是不是SPring的版本不对,这是个老项目,spirng应该是3.0.3** org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected org.springframework.data.redis.core.RedisTemplate com.common.redis.dao.AbstractRedisBaseDao.redisTemplate; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in class path resource [com/common/redis/RedisConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.data.redis.core.StringRedisTemplate com.common.redis.RedisConfiguration.redisTemplate()] threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/serializer/support/SerializingConverter at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1064) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1739) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:482) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:431) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) at sun.rmi.transport.Transport$2.run(Transport.java:202) at sun.rmi.transport.Transport$2.run(Transport.java:199) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:198) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

求springmvc中的@ResponseBody怎么配置,才能将自定义的po类转换成json格式

在springmvc中,我想通过@ResponseBody的方式来返回json格式的数据,在<mvc:annotation-driven></mvc:annotation-driven>中应该怎么配置,网上找了很久没找到,我用的sprin版本是4.2.5的 我的Controller是这样的 ![图片说明](https://img-ask.csdn.net/upload/201604/11/1460389390_631506.png) 前台的js是这么写的![图片说明](https://img-ask.csdn.net/upload/201604/11/1460389488_577398.png) 在这个配置文件里面是不是还要配置一下啊?具体怎么配置,求教一下,小弟感激不尽。![图片说明](https://img-ask.csdn.net/upload/201604/12/1460432083_60544.png)

JAVA springMVC 注解@ResponseBody 返回json数据出现乱码

1、tomcat版本为7.0 配置文件已修改成utf-8编码 2、项目编码已统一为utf-8,Spring版本为4.2.5 3、springmvc中json的配置如下 ![图片说明](https://img-ask.csdn.net/upload/201806/11/1528699445_531933.jpg) 4、调用方法如下:注意红框加不加都没有影响最后效果 ![图片说明](https://img-ask.csdn.net/upload/201806/11/1528699488_791713.jpg) 5、页面结果如下: ![图片说明](https://img-ask.csdn.net/upload/201806/11/1528699562_635471.jpg) 6、页面请求及响应头信息如下: ![图片说明](https://img-ask.csdn.net/upload/201806/11/1528699568_892881.jpg) 实在是没找到什么原因导致的乱码情况,希望有知晓的朋友帮忙提示处理下

Tomcat启动报错,NoUniqueBeanDefinitionException

tomcat启动报错。 ``` [10:04:30.465] ERROR org.springframework.web.servlet.FrameworkServlet 501 initServletBean - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apiCaterController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.komlin.modular.user.service.IUserService com.komlin.modular.api.controller.ApiCaterController.iUserService; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.komlin.modular.user.service.IUserService] is defined: expected single matching bean but found 2: IUserServiceImpl,userServiceImpl at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:667) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:633) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:681) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:552) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:493) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR] at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1230) [catalina.jar:7.0.88] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1174) [catalina.jar:7.0.88] at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:847) [catalina.jar:7.0.88] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135) [catalina.jar:7.0.88] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) [catalina.jar:7.0.88] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498) [catalina.jar:7.0.88] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) [catalina.jar:7.0.88] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.88] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025) [catalina.jar:7.0.88] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.88] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) [catalina.jar:7.0.88] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1139) [tomcat-coyote.jar:7.0.88] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) [tomcat-coyote.jar:7.0.88] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [tomcat-coyote.jar:7.0.88] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.88] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171] Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.komlin.modular.user.service.IUserService com.komlin.modular.api.controller.ApiCaterController.iUserService; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.komlin.modular.user.service.IUserService] is defined: expected single matching bean but found 2: IUserServiceImpl,userServiceImpl at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] ... 35 more Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.komlin.modular.user.service.IUserService] is defined: expected single matching bean but found 2: IUserServiceImpl,userServiceImpl at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1126) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] ... 35 more ```

java初学MyEclipse_maven搭建web项目测试dao接口报错

[org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring.xml] [org.springframework.context.annotation.ClassPathBeanDefinitionScanner]JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning [org.springframework.context.annotation.ClassPathBeanDefinitionScanner]JSR-330 'javax.inject.Named' annotation found and supported for component scanning [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring-hibernate.xml] [org.springframework.context.support.GenericApplicationContext]Refreshing org.springframework.context.support.GenericApplicationContext@680a6131: startup date [Mon Feb 13 10:55:44 CST 2017]; root of context hierarchy [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]Loading properties file from class path resource [config.properties] [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]JSR-330 'javax.inject.Inject' annotation found and supported for autowiring [org.springframework.beans.factory.support.DefaultListableBeanFactory]Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@537b20c6: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,userDao,userService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dataSource,sessionFactory,transactionManager,transactionAdvice,org.springframework.aop.config.internalAutoProxyCreator,transactionPointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy [com.alibaba.druid.pool.DruidAbstractDataSource]maxIdle is deprecated [com.alibaba.druid.pool.DruidDataSource]{dataSource-1} inited [org.hibernate.annotations.common.Version]HCANN000001: Hibernate Commons Annotations {4.0.1.Final} [org.hibernate.Version]HHH000412: Hibernate Core {4.2.5.Final} [org.hibernate.cfg.Environment]HHH000206: hibernate.properties not found [org.hibernate.cfg.Environment]HHH000021: Bytecode provider name : javassist [org.hibernate.dialect.Dialect]HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator]HHH000399: Using default transaction strategy (direct JDBC transactions) [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory]HHH000397: Using ASTQueryTranslatorFactory SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000228: Running hbm2ddl schema update [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000102: Fetching database metadata [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000396: Updating schema [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000261: Table found: ssh_test.users [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000037: Columns: [id, sex, username, address, age, name, password] [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000108: Foreign keys: [] [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000126: Indexes: [age, primary] [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000232: Schema update complete [org.springframework.orm.hibernate4.HibernateTransactionManager]Using DataSource [{ CreateTime:"2017-02-13 10:55:44", ActiveCount:0, PoolingCount:1, CreateCount:1, DestroyCount:0, CloseCount:2, ConnectCount:2, Connections:[ {ID:337257430, ConnectTime:"2017-02-13 10:55:45", UseCount:2, LastActiveTime:"2017-02-13 10:55:46"} ] }] of Hibernate SessionFactory for HibernateTransactionManager [org.springframework.context.support.GenericApplicationContext]Closing org.springframework.context.support.GenericApplicationContext@680a6131: startup date [Mon Feb 13 10:55:44 CST 2017]; root of context hierarchy [org.springframework.beans.factory.support.DefaultListableBeanFactory]Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@537b20c6: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,userDao,userService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dataSource,sessionFactory,transactionManager,transactionAdvice,org.springframework.aop.config.internalAutoProxyCreator,transactionPointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy [com.alibaba.druid.pool.DruidDataSource]{dataSource-1} closed

说是找不到实体类,但是是有的,有没有大佬

2019-01-08 16:34:30.883[DubboServerHandler-192.168.176.14:20802-thread-8] ERROR com.alibaba.dubbo.rpc.filter.ExceptionFilter 87 invoke - [DUBBO] Got unchecked and undeclared exception which called by 192.168.176.14. service: com.tydic.crm.api.business.interfaces.LogOpenNumberErrApi, method: logOpenNumberErrApi, exception: java.lang.RuntimeException: Can't find DataService: com.tydic.crm.db.po.LogOpenNumberErrPO, dubbo version: 2.5.3, current host: 192.168.176.14 java.lang.RuntimeException: Can't find DataService: com.tydic.crm.db.po.LogOpenNumberErrPO at com.tydic.uda.service.factory.DefaultDataServiceFactory.getDataService(DefaultDataServiceFactory.java:178) ~[uda-1.3.1.2.jar:?] at com.tydic.uda.service.factory.DefaultDataServiceFactory.getDataService(DefaultDataServiceFactory.java:187) ~[uda-1.3.1.2.jar:?] at com.tydic.uda.service.support.DataServiceProxy.getDataService(DataServiceProxy.java:34) ~[uda-1.3.1.2.jar:?] at com.tydic.uda.service.support.DataServiceProxy.query(DataServiceProxy.java:67) ~[uda-1.3.1.2.jar:?] at com.tydic.crm.db.impl.LogOpenNumberErrServImpl.queryLogOpenNumberErrByRecover(LogOpenNumberErrServImpl.java:30) ~[crm_db.jar:?] at com.tydic.crm.core.innet.impl.OperateLogOpenNUmberErrCoreServImpl.selectLogOpenNUmberErr(OperateLogOpenNUmberErrCoreServImpl.java:29) ~[crm_innet_core.jar:?] at com.tydic.crm.core.innet.impl.OperateLogOpenNUmberErrCoreServImpl$$FastClassBySpringCGLIB$$2a2b258c.invoke(<generated>) ~[crm_innet_core.jar:?] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at com.tydic.crm.core.innet.impl.OperateLogOpenNUmberErrCoreServImpl$$EnhancerBySpringCGLIB$$e20fe48e.selectLogOpenNUmberErr(<generated>) ~[crm_innet_core.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_141] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_141] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] public JSONObject logOpenNumberErrApi() throws PubOutputDTO { Log4jUtil.logInfo("开户失败补偿调用", this.getClass()); List<LogOpenNumberErrPO> list = logOpenNumberErrServ.queryLogOpenNumberErrByRecover("0");//出错报的是这一行 JSONObject jsonObject = null; for (LogOpenNumberErrPO logList : list) { logger.info("查询LogOpenNumberErr结束,出参为"+logList); String errPoint = logList.getErr_point(); logger.info("错误标志位Err_point,为"+errPoint); JSONObject jsonObjectInput = JSONObject.fromObject(logList.getInput_message()); JSONObject jsonObjectOutput = JSONObject.fromObject(logList.getOutput_message()); try{ logger.info("开户重入服务入参jsonObjectInput:"+jsonObjectInput+"jsonObjectOutput:"+jsonObjectOutput); logOpenNumberErrCoreServ.LogOpenNumberErrCoreTrans(jsonObjectInput, jsonObjectOutput, logList); }catch (PubOutputDTO e) { jsonObject = JSONObject.fromObject(e.toMap()); logger.error("开户重入服务异常出参json形式:" + jsonObject.toString()); } } return jsonObject; } //这个是查询的实现 @Override public List<LogOpenNumberErrPO> queryLogOpenNumberErrByRecover(String recover) { return SERVICE.query(Condition.build("queryLogOpenNumberErrByRecover") .filter("recover", recover) ); } 这个是xml里面的查询方法 <query name="queryLogOpenNumberErrByRecover"> SELECT LOG_OPEN_ID, ERR_POINT, ERR_MESSAGE, INPUT_MESSAGE, CREATE_DATE, UPDATE_DATE,RECOVER,REMARK,OUTPUT_MESSAGE FROM LOG_OPEN_NUMBER_ERR WHERE RECOVER = #{filter.recover} </query>

dubbo服务调用报错,哪位大神知道这是什么错误

Caused by: com.alibaba.com.caucho.hessian.io.HessianProtocolException: 'org.springframework.beans.factory.NoUniqueBeanDefinitionException' could not be instantiated at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:275) ~[dubbo-2.8.4.jar:2.8.4] at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:155) ~[dubbo-2.8.4.jar:2.8.4] at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2067) ~[dubbo-2.8.4.jar:2.8.4] at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1592) ~[dubbo-2.8.4.jar:2.8.4] at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1576) ~[dubbo-2.8.4.jar:2.8.4] at com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:396) ~[dubbo-2.8.4.jar:2.8.4] ... 27 common frames omitted Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_191] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_191] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_191] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_191] at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:271) ~[dubbo-2.8.4.jar:2.8.4] ... 32 common frames omitted Caused by: java.lang.NullPointerException: null at java.util.Objects.requireNonNull(Objects.java:203) ~[na:1.8.0_191] at java.util.Arrays$ArrayList.<init>(Arrays.java:3813) ~[na:1.8.0_191] at java.util.Arrays.asList(Arrays.java:3800) ~[na:1.8.0_191] at org.springframework.beans.factory.NoUniqueBeanDefinitionException.<init>(NoUniqueBeanDefinitionException.java:65) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] ... 37 common frames omitted ``` ```

web项目启动报错。mapper 有问题

``` Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.komlin.modular.checkon.mapper.CheckOnMapper.BaseResultMap at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:782) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:754) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.session.Configuration.addResultMap(Configuration.java:536) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:207) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.builder.ResultMapResolver.resolve(ResultMapResolver.java:47) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:284) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:251) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:243) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:116) ~[mybatis-3.2.8.jar:3.2.8] at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92) ~[mybatis-3.2.8.jar:3.2.8] at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:464) ~[mybatis-spring-1.2.2.jar:1.2.2] at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:340) ~[mybatis-spring-1.2.2.jar:1.2.2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] ... 57 more ```

ehcache使用报错java.io.EOFException DiskStorageFactory.retrieve?

项目中使用ehcache报错如下: net.sf.ehcache.CacheException: java.io.EOFException at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:938) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.store.disk.Segment.decode(Segment.java:167) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.store.disk.Segment.put(Segment.java:444) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.store.disk.DiskStore.put(DiskStore.java:475) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.store.FrontEndCacheTier.put(FrontEndCacheTier.java:221) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.Cache.putInternal(Cache.java:1492) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.Cache.put(Cache.java:1417) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.Cache.put(Cache.java:1382) ~[ehcache-core-2.5.0.jar:na] at org.springframework.cache.ehcache.EhCacheCache.put(EhCacheCache.java:82) ~[spring-context-support-4.2.5.RELEASE.jar:4.2.5.RELEASE] at com.order.util.base.util.EhcacheUtil.put(EhcacheUtil.java:128) at com.order.service.impl.orderServerImpl.order(orderServerImpl.java:80) at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844) [spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.23] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:8.5.23] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.23] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.23] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.23] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.23] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) [catalina.jar:8.5.23] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.23] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.23] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-coyote.jar:8.5.23] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.23] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:8.5.23] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-coyote.jar:8.5.23] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.23] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.23] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] Caused by: java.io.EOFException: null at java.io.RandomAccessFile.readFully(RandomAccessFile.java:446) ~[na:1.7.0_79] at java.io.RandomAccessFile.readFully(RandomAccessFile.java:424) ~[na:1.7.0_79] at net.sf.ehcache.store.disk.DiskStorageFactory.read(DiskStorageFactory.java:372) ~[ehcache-core-2.5.0.jar:na] at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:936) ~[ehcache-core-2.5.0.jar:na] ... 55 common frames omitted

验证码不能生成(解决问题有加分)

2017-11-23 16:15:09 ERROR o.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[springServlet] - Servlet.service() for servlet [springServlet] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/CacheManager] with root cause java.lang.ClassNotFoundException: net.sf.ehcache.CacheManager at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1854) ~[catalina.jar:7.0.65] at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703) ~[catalina.jar:7.0.65] at com.yanshangtech.common.utils.EHCacheUtil.init(EHCacheUtil.java:37) ~[common-1.0-SNAPSHOT.jar:na] at com.yanshangtech.common.utils.EHCacheUtil.<clinit>(EHCacheUtil.java:20) ~[common-1.0-SNAPSHOT.jar:na] at com.yanshangtech.common.utils.Cache.set(Cache.java:55) ~[common-1.0-SNAPSHOT.jar:na] at com.yanshangtech.mgt.controller.sys.LoginController.getCaptcha(LoginController.java:52) ~[classes/:na] at com.yanshangtech.mgt.controller.sys.LoginController$$FastClassBySpringCGLIB$$493e45f2.invoke(<generated>) ~[classes/:na] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at com.yanshangtech.mgt.common.controller.HasAccess.beforeController(HasAccess.java:48) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_80] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_80] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_80] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_80]![图片说明](https://img-ask.csdn.net/upload/201711/23/1511425108_840189.png)

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

将一个接口响应时间从2s优化到 200ms以内的一个案例

一、背景 在开发联调阶段发现一个接口的响应时间特别长,经常超时,囧… 本文讲讲是如何定位到性能瓶颈以及修改的思路,将该接口从 2 s 左右优化到 200ms 以内 。 二、步骤 2.1 定位 定位性能瓶颈有两个思路,一个是通过工具去监控,一个是通过经验去猜想。 2.1.1 工具监控 就工具而言,推荐使用 arthas ,用到的是 trace 命令 具体安装步骤很简单,大家自行研究。 我的使用步骤是...

学历低,无法胜任工作,大佬告诉你应该怎么做

微信上收到一位读者小涛的留言,大致的意思是自己只有高中学历,经过培训后找到了一份工作,但很难胜任,考虑要不要辞职找一份他能力可以胜任的实习工作。下面是他留言的一部分内容: 二哥,我是 2016 年高中毕业的,考上了大学但没去成,主要是因为当时家里经济条件不太允许。 打工了三年后想学一门技术,就去培训了。培训的学校比较垃圾,现在非常后悔没去正规一点的机构培训。 去年 11 月份来北京找到了一份工...

JVM内存结构和Java内存模型别再傻傻分不清了

讲一讲什么是Java内存模型 Java内存模型虽说是一个老生常谈的问题 ,也是大厂面试中绕不过的,甚至初级面试也会问到。但是真正要理解起来,还是相当困难,主要这个东西看不见,摸不着。 这是一个比较开放的题目,面试官主要想考察的是对Java内存模型的了解到了什么程度了,然后根据回答进行进一步的提问 下面,我们就这个问题的回答列一下我们的思路 具体的思路如下: 说一说Java内存模型的缘由 简略辨析...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Google 与微软的浏览器之争

浏览器再现“神仙打架”。整理 | 屠敏头图 | CSDN 下载自东方 IC出品 | CSDN(ID:CSDNnews)从 IE 到 Chrome,再从 Chrome 到 Edge,微软与...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

立即提问
相关内容推荐