创建名为“userRealm”的bean时出错:通过字段“adminService”表示的未满足的依赖关系;嵌套异常是org.springframe .bean .factory

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRealm': Unsatisfied dependency expressed through field 'adminService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'adminServiceImpl': Unsatisfied dependency expressed through field 'sysAdminLoginMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysAdminLoginMapper' defined in file [G:\IdeaProjects\anyoufang-java\framerwork-management\admin\target\classes\com\chuangting\admin\dao\SysAdminLoginMapper.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 [G:\IdeaProjects\anyoufang-java\root\target\classes\mapper\house\HHouseAccessoriesMapper.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.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1344) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1234) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at com.chuangting.Application.main(Application.java:14) [classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'adminServiceImpl': Unsatisfied dependency expressed through field 'sysAdminLoginMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysAdminLoginMapper' defined in file [G:\IdeaProjects\anyoufang-java\framerwork-management\admin\target\classes\com\chuangting\admin\dao\SysAdminLoginMapper.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 [G:\IdeaProjects\anyoufang-java\root\target\classes\mapper\house\HHouseAccessoriesMapper.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.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1344) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 19 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysAdminLoginMapper' defined in file [G:\IdeaProjects\anyoufang-java\framerwork-management\admin\target\classes\com\chuangting\admin\dao\SysAdminLoginMapper.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 [G:\IdeaProjects\anyoufang-java\root\target\classes\mapper\house\HHouseAccessoriesMapper.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.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1439) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1326) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 32 common frames omitted
Caused by: 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 [G:\IdeaProjects\anyoufang-java\root\target\classes\mapper\house\HHouseAccessoriesMapper.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.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1424) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 43 common frames omitted
Caused by: 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 [G:\IdeaProjects\anyoufang-java\root\target\classes\mapper\house\HHouseAccessoriesMapper.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.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 55 common frames omitted
Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [G:\IdeaProjects\anyoufang-java\root\target\classes\mapper\house\HHouseAccessoriesMapper.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.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:523) ~[mybatis-spring-1.3.1.jar:1.3.1]
at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:380) ~[mybatis-spring-1.3.1.jar:1.3.1]
at org.mybatis.spring.SqlSessionFactoryBean.getObject(SqlSessionFactoryBean.java:547) ~[mybatis-spring-1.3.1.jar:1.3.1]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.sqlSessionFactory(MybatisAutoConfiguration.java:153) ~[mybatis-spring-boot-autoconfigure-1.3.1.jar:1.3.1]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$420f5dd4.CGLIB$sqlSessionFactory$0() ~[mybatis-spring-boot-autoconfigure-1.3.1.jar:1.3.1]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$420f5dd4$$FastClassBySpringCGLIB$$953f7cc1.invoke() ~[mybatis-spring-boot-autoconfigure-1.3.1.jar:1.3.1]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$420f5dd4.sqlSessionFactory() ~[mybatis-spring-boot-autoconfigure-1.3.1.jar:1.3.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 56 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92) ~[mybatis-3.4.5.jar:3.4.5]
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:521) ~[mybatis-spring-1.3.1.jar:1.3.1]
... 69 common frames omitted
Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.chuangting.house.dao.HHouseAccessoriesMapper.BaseResultMap
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:872) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:844) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.session.Configuration.addResultMap(Configuration.java:626) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:214) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.builder.ResultMapResolver.resolve(ResultMapResolver.java:47) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:285) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:252) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:244) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:116) ~[mybatis-3.4.5.jar:3.4.5]
... 71 common frames omitted

Process finished with exit code 1


2个回答

adminService看下实现类有没有@service注解

继续往下看报错信息,HHouseAccessoriesMapper.xml配置有问题,看下是不是重复了BaseResultMap配置(2个以上)

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
vue 无法向data中的数组中push
``` new Vue({ el: "#adminDiv", data: { admins: [], id: null, aname: null, pwd: null }, created: function () { alert("loadList"); $.get("admin/load").success(function (list) { alert(list.length); for(var i=0;i<list.length;i++){ alert(list[i].aname); this.admins.push(list[i]); } }) }, ``` list里面数据是正确的,但是无法push到data里的数组中,不知道是为什么求教 这里push会报错 ![图片说明](https://img-ask.csdn.net/upload/201905/22/1558489926_454576.png)
Python编程从入门到实践 第18章Django入门 第365页“添加主题”出错,找不出原因,求大神帮忙
电脑系统为64位的win7,python为64位的3.7.4版本,Django为2.2.4版本,学习第365页“添加主题”遇到了麻烦 ,自己摸索了很长时间,网上也搜索了很久还是没解决,求大神帮帮小白。 ![图片说明](https://img-ask.csdn.net/upload/201908/27/1566913286_833364.jpg) 在添加Chess主题时网页和终端里都报错,终端错误截图如下: ![图片说明](https://img-ask.csdn.net/upload/201908/27/1566912120_690258.png) 网页错误最前面的截图如下: ![图片说明](https://img-ask.csdn.net/upload/201908/27/1566912225_331720.png) 网页错误提示很长,下面这张是最后带提示的截图,我按照提示把settings.py文件里的DEBUG = False后,终端就退出了,再次运行python manage.py runserver终端也无法启动。 ![图片说明](https://img-ask.csdn.net/upload/201908/27/1566912555_34630.png) 仔细检查代码也没查出来,models.py,settings.py,admins.py代码如下: ![图片说明](https://img-ask.csdn.net/upload/201908/27/1566913232_687107.png) ![图片说明](https://img-ask.csdn.net/upload/201908/27/1566913242_373496.png) ![图片说明](https://img-ask.csdn.net/upload/201908/27/1566913253_641400.png)
vue跑项目跑不起来,求解一下
C:\Users\zsj>d: D:\>cd work D:\work>cd admins D:\work\admins>npm run ip > vue-admin@0.1.12 ip D:\work\admins > cross-env NODE_ENV=development node build/dev-server.js [HPM] Proxy created: /MODApis -> http://dev.markitondemand.com webpack: wait until bundle finished: webpack: wait until bundle finished: /index.html webpack built de040423250ca96e6acb in 8676ms Hash: de040423250ca96e6acb Version: webpack 2.6.1 Time: 8676ms Asset Size Chunks Chunk Names assets/img/fontawesome-webfont.912ec66.svg 444 kB assets/fonts/fontawesome-webfont.674f50d.eot 166 kB assets/fonts/fontawesome-webfont.b06871f.ttf 166 kB assets/fonts/fontawesome-webfont.af7ae50.woff2 77.2 kB assets/fonts/fontawesome-webfont.fee66e7.woff 98 kB app.js 3.72 MB 0 app vendor.js 1.03 MB 1 vendor ERROR in ./client/store/modules/menu/lazyLoading.js Module build failed: SyntaxError: D:/work/admins/client/store/modules/menu/lazyL oading.js: Unexpected token (3:46) 1 | // lazy loading Components 2 | // https://github.com/vuejs/vue-router/blob/dev/examples/lazy-loading/app. js#L8 > 3 | export default (name, index = false) => () => import(`views/${name}${index ? '/index' : ''}.vue`) | ^ 4 | @ ./client/store/modules/menu/index.js 2:0-40 @ ./client/store/index.js @ ./client/app.js @ ./client/index.js @ multi ./build/dev-client ./client/index.js ERROR in ./client/components/layout/index.js Module build failed: SyntaxError: D:/work/admins/client/components/layout/index. js: Unexpected token, expected { (1:7) > 1 | export Navbar from './Navbar' | ^ 2 | 3 | export Sidebar from './Sidebar' 4 | @ ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./cli ent/App.vue 13:0-73 @ ./client/App.vue @ ./client/app.js @ ./client/index.js @ multi ./build/dev-client ./client/index.js ERROR in ./~/vue-bulma-jump/src/index.js Module build failed: SyntaxError: D:/work/admins/node_modules/vue-bulma-jump/src /index.js: Unexpected token, expected { (1:7) > 1 | export BackToTop from './BackToTop' | ^ 2 | export default from './Jump' 3 | @ ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./cli ent/views/Home.vue 147:0-43 @ ./client/views/Home.vue @ ./client/router/index.js @ ./client/app.js @ ./client/index.js @ multi ./build/dev-client ./client/index.js Child html-webpack-plugin for "index.html": Asset Size Chunks Chunk Names index.html 1.48 MB 0 webpack: Failed to compile. > Listening at http://localhost:8080
django 在生产环境下,不能发送错误报告邮件
我的架构是 Nginx+supervisord+gunicorn+django1.11 我在视图中手动抛出一个异常 ```python def mytestfn(request): a=3/0 print(a) return HttpResponse("it's ok") ``` 在本地环境下,当访问这个视图的时候会报错并发送邮件到邮箱提醒,但在生产环境下报502错误,但没有发送错误报告邮件。 我的邮箱发送配置: settings.py ```python ADMINS = MANAGERS = ( ('abc','xxxxxxxxxxx@qq.com'), ) EMAIL_HOST= 'smtp.qq.com'#QQ邮箱SMTP服务器(邮箱需要开通SMTP服务) EMAIL_PORT= 25 #QQ邮箱SMTP服务端口 EMAIL_HOST_USER = 'xxxxxxxxxx@qq.com' #我的邮箱帐号 EMAIL_HOST_PASSWORD = 'xxxxxxxxxx' #授权码 EMAIL_SUBJECT_PREFIX = 'website' #为邮件标题的前缀,默认是'[django]' DEFAULT_FROM_EMAIL = SERVER_EMAIL = EMAIL_HOST_USER LOGGING={ 'version':1, 'disable_existing_loggers':False, 'formatters':{ 'default':{ 'format':'%(levelname)s%(asctime)s%(module)s:' '%(funcName)s:%(lineno)d%(message)s' } }, 'handlers': { 'console':{ 'level':'INFO', 'class':'logging.StreamHandler', 'formatter':'default' }, 'file': { 'level': 'INFO', 'class': 'logging.handlers.RotatingFileHandler', 'filename': '/tmp/logs/project.log', 'maxBytes': 1024 * 1024, 'backupCount': 5 }, 'mail_admins': { 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', 'include_html': True, }, }, 'loggers':{ '':{ 'handlers':['console'], 'level':'INFO', 'propagate':True }, 'django.request': { 'handlers': ['console', 'mail_admins'], 'propagate': True, 'level': 'ERROR', }, }, } ``` 在项目中的日志也记录下了这个错误 ![图片说明](https://img-ask.csdn.net/upload/201906/30/1561907102_482346.png) 想请教各位大神是个什么情况,为啥本地能正常发送错误报告但部署到生产环境就发送不了
求助,jsp里面java的类型转换问题
从dao里面返回的ArrayList转换成自定义的vo时报错,不知道怎么办了(我java没怎么学) 或者可不可以dao直接返回自定义vo login.jsp ``` <%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="UTF-8"%> <%@ page import="vo.Admin,dao.AdminDao" %> <html> <body> <form action = "login.jsp"> 账号:<input type = "text" name = "adminname"><br> 密码:<input type = "password" name = "password"><br> <input type = "submit" value = "登录"> </form> <% String adminname = request.getParameter("adminname"); String password = request.getParameter("password"); if(adminname!=null&&password!=null){ AdminDao admindao=new AdminDao(); System.out.print("test"); Admin admin=(Admin)admindao.queryAllAdmins(adminname); if(password.equals(admin.getPassword())){ response.sendRedirect("JxglSys/servlets/InitServlet"); } } %> </body> </html> ``` AdminDao.java ``` package dao; import java.sql.*; import java.util.ArrayList; import vo.Admin; public class AdminDao { public ArrayList queryAllAdmins(String adminname) throws Exception{ ArrayList admins= new ArrayList(); try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String url = "jdbc:sqlserver://localhost:1433;DatabaseName=JXGL"; Connection conn = DriverManager.getConnection(url,"sa","nmybj.19981227"); System.out.print(adminname); String sql = "SELECT ADMINNAME,PASSWORD FROM ADMIN WHERE ADMINNAME = '"+adminname+"'"; Statement stat = conn.createStatement(); ResultSet rs = stat.executeQuery(sql); while(rs.next()) { Admin admin = new Admin(); admin.setAdminname(rs.getString("ADMINNAME")); admin.setPassword(rs.getString("PASSWORD")); admins.add(admin); } rs.close(); stat.close(); } catch (SQLException e) { //e.printStackTrace(); System.out.print("Database error"); } return admins; } } ``` Admin.java ``` package vo; public class Admin { private String adminname; private String password; public String getAdminname() { return adminname; } public void setAdminname(String adminname) { this.adminname = adminname; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } } ```
在windows server2012安装VisualSVN Server报错
在windows server2012安装VisualSVN Server报错,求助! 报错信息:Custom action CreateAdminGroupExecute failed:Cannot create group 'VisualSVN Server Admins':系统找不到指定的文件,如下图: ![图片说明](https://img-ask.csdn.net/upload/201510/12/1444631124_787641.jpg)
真机测试出错误 在线等待大神
真机调试错误 No provisioning profiles found: No non–expired provisioning profiles were found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1' 怎么回事?公司分了一个开发小组成员给我证书什么的也都是按教程来的 但是就是一真机调试就是这个。 运行一下提示No non–expired provisioning profiles were found. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.好吧有道翻译一下 没有非过期配置概要文件被发现。Xcode可以解决这个问题,从会员下载一个新的配置配置文件中心。 好吧接着点击修复出现这个 Only agents and admins are allowed to add devices to this team. Please have a team admin or agent add this device for you. If you need assistance, please contact Apple Developer Support (http://developer.apple.com/support). 继续有道一下  只有代理和管理员可以将设备添加到这个团队。请团队管理或代理为你添加这个设备。 如果你需要帮助,请联系苹果开发者支持(http://developer.apple.com/support)。 我郁闷了 设备添加了啊 求解
easy ui datagrid 没有请求url指定的servlet
问题: 直接访问servlet可以得到数据: ![图片说明](https://img-ask.csdn.net/upload/201704/26/1493184117_370983.jpg) 但是通过通过页面访问发现datagrid 根本就不发送请求: ![图片说明](https://img-ask.csdn.net/upload/201704/26/1493184317_140963.jpg) 页面: ``` <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <script type="text/javascript" src="../../jslib/jqueryjs/jquery-1.9.1.main"></script> <!-- 2 css资源 --> <link rel="stylesheet" type="text/css" href="../../css/jquerycss/easyui.css"> <!-- 3、图标资源 --> <link rel="stylesheet" type="text/css" href="../../css/jquerycss/icon.css"> <!-- 4、easyui的js包 --> <script type="text/javascript" src="../../jslib/jqueryjs/jquery.easyui.min.js"></script> <!-- 5、本地语言 --> <script type="text/javascript" src="../../jslib/jqueryjs/easyui-lang-zh_CN.js"></script> </head> <body> <script type="text/javascript"> $(function(){ //创建data_grid $("#st").datagrid({ url:'/JsonServlet', //数据来源 //列的定义 columns:[[ {field:'id',title:'用户ID',width:50}, {field:'name',title:'用户姓名',width:50}, {field:'passWord',title:'用户密码',width:50,align:'right'} ]], fitColumns:true,//列自适应宽度,不能和冻结列同时设置为true striped:true,//斑马线效果 idField:'id',//主键列 rownumbers:true,//显示行号 singleSelect:false,//是否单选 pagination:true,//显示分页栏 pageList:[10,20,50,100],//每页行数选择列表 pageSize:10,//出事每页行数 remoteSort:false,//是否服务器端排序,设成false,才能客户端排序 sortName:'sclass'//设置排序列 }); }) </script> <table id="st"></table> </body> </html> ``` JsonServlet: ``` package com.climberclimbing.github.io.servlet; import java.io.IOException; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.climberclimbing.github.io.dao.AdminDaoImp; import com.climberclimbing.github.io.model.*; import net.sf.json.JSONArray; public class JsonServlet extends HttpServlet{ private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { ArrayList <Admin> admins=new ArrayList<Admin>(); AdminDaoImp adminDaoImp = new AdminDaoImp(); admins = adminDaoImp.getAllAdmin(); JSONArray result = JSONArray.fromObject(admins); String JsonResult = "{\"total\":"+admins.size()+","+"\"rows\":"+result.toString()+"}"; System.out.println(JsonResult); resp.getWriter().write(JsonResult); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // TODO Auto-generated method stub doGet(req, resp); } } ```
在winserver2012 上安装visualsvn server失败!
在windows server2012安装VisualSVN Server报错,求助! 报错信息:Custom action CreateAdminGroupExecute failed:Cannot create group 'VisualSVN Server Admins':系统找不到指定的文件
SpringMVC结构有没有可能在不基于XML的方式中与数据库发生交互?
小弟之前使用Sping框架的时候SQL语言都是写在XML中的,如: ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN" "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd"> <mapper namespace="com.sdzw.dao.AdminsMapper"> <!-- findAdminName --> <!-- 根据传入的adminname查找相关的信息 --> <select id="findAdminName" parameterType="java.lang.String" resultType="com.sdzw.entity.Admins"> SELECT * FROM admins WHERE admin_name= #{adminName} </select> <!-- save --> <!-- 保存新建的管理员账户 --> <insert id="save" parameterType="com.sdzw.entity.Admins"> INSERT INTO admins VALUES (#{admin_id},#{admin_name}, #{admin_password},#{admin_nickname}) </insert> <!-- update --> <!-- 对已经存在的用户信息进行修改 --> <update id="update" parameterType="com.sdzw.entity.Admins"> UPDATE admins SET admin_name=#{admin_name},admin_password=#{admin_password},admin_nickname=#{admin_nickname} WHERE admin_id=#{admin_id} </update> </mapper> ``` 现在领导要求将代码写死在Java语言中,还要使用Spring框架,请问有没有解决的办法
求助:c#窗体初始化异常
![图片说明](https://img-ask.csdn.net/upload/201904/29/1556530605_408054.png) namespace AutoShop { public partial class Form1 : Form { /// <summary> /// 数据库连接字符串 /// </summary> private static string cgConnstr = System.Configuration.ConfigurationManager.ConnectionStrings["DBconnStr"].ToString(); DataAccess dataAcc = new DataAccess(cgConnstr); List<Administer> admins = null; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string loginName = txtName.Text,pwd=txtPwd.Text; int statue = 0; foreach (Administer admin in admins) { if (admin.phoneNum.Equals(loginName)) { statue = 1; if (admin.password.Equals(pwd)) { MessageBox.Show("登录成功!"); } else MessageBox.Show("密码不正确!"); break; } } if (statue == 0) { MessageBox.Show("不存在用户名!"); } } private void Form1_Load(object sender, EventArgs e) { admins = dataAcc.GetAdministers(); } private void button2_Click(object sender, EventArgs e) { JoinForm join=new JoinForm(); join.Show(); } } }
hyperledger fabric 1.1.0 solo模式多机部署问题
在部署peer 结点并且创建channel(peer channel create -o orderer.example.com:7050 -t 50s -c mychannel -f ./channel-artifacts/mychannel.tx)时,报错如下 2018-09-16 04:00:35.140 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-09-13 03:27:21 +0000 UTC 2018-09-16 04:00:35.140 UTC [msp] Validate -> DEBU 036 MSP Org1MSP validating identity 2018-09-16 04:00:35.140 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity 2018-09-16 04:00:35.140 UTC [grpc] Printf -> DEBU 038 parsed scheme: "" 2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 039 scheme "" not registered, fallback to default scheme 2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 <nil>}] 2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 03b ClientConn switching balancer to "pick_first" 2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4201e87f0, CONNECTING 2018-09-16 04:00:35.142 UTC [grpc] Printf -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4201e87f0, READY 2018-09-16 04:00:35.142 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized 2018-09-16 04:00:35.142 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity 2018-09-16 04:00:35.143 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity 2018-09-16 04:00:35.143 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AA2060A074F7267314D53501296062D...53616D706C65436F6E736F727469756D 2018-09-16 04:00:35.143 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: DC3500D168C423A486C0F683F5DF55BFE21B7EA850AA349C0D007546157C15AC 2018-09-16 04:00:35.143 UTC [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity 2018-09-16 04:00:35.143 UTC [msp] GetDefaultSigningIdentity -> DEBU 044 Obtaining default signing identity 2018-09-16 04:00:35.143 UTC [msp/identity] Sign -> DEBU 045 Sign: plaintext: 0AD9060A1508021A0608E3AAF7DC0522...4A549260CA04773C47CF17A70D57D107 2018-09-16 04:00:35.144 UTC [msp/identity] Sign -> DEBU 046 Sign: digest: D717D2150B425501D954A480D4A4DFE4D0861F3E3AE76791722755A46BB07707 2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 047 parsed scheme: "" 2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 048 scheme "" not registered, fallback to default scheme 2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 <nil>}] 2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 04a ClientConn switching balancer to "pick_first" 2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc4201e9120, CONNECTING 2018-09-16 04:00:35.145 UTC [grpc] Printf -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc4201e9120, READY Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: invalid mod_policy for element [Policy] /Channel/Application/Admins: mod_policy not set 求大神解答
萌芽求救 HIVE启动失败
**IT届 萌芽求救** ``` [root@h1 ~]# hive Logging initialized using configuration in jar:file:/usr/local/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties Java HotSpot(TM) Client VM warning: You have loaded library /usr/local/hadoop-2.6.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:344) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625) 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.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1412) at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:62) at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72) at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2444) at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2456) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:338) ... 8 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1410) ... 13 more Caused by: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory NestedThrowables: java.lang.reflect.InvocationTargetException ... ``` 这是我的配置文件hive-env.sh: ``` [root@h1 conf]# cat hive-env.sh # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Set Hive and Hadoop environment variables here. These variables can be used # to control the execution of Hive. It should be used by admins to configure # the Hive installation (so that users do not have to set environment variables # or set command line parameters to get correct behavior). # # The hive service being invoked (CLI/HWI etc.) is available via the environment # variable SERVICE # Hive Client memory usage can be an issue if a large number of clients # are running at the same time. The flags below have been useful in # reducing memory usage: # # if [ "$SERVICE" = "cli" ]; then # if [ -z "$DEBUG" ]; then # export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseParNewGC -XX:-UseGCOverheadLimit" # else # export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit" # fi # fi # The heap size of the jvm stared by hive shell script can be controlled via: # export HADOOP_HEAPSIZE=1024 # # Larger heap size may be required when running queries over large number of files or partitions. # By default hive shell scripts use a heap size of 256 (MB). Larger heap size would also be # appropriate for hive server (hwi etc). # Set HADOOP_HOME to point to a specific hadoop install directory # HADOOP_HOME=${bin}/../../hadoop HADOOP_HOME=${HADOOP_HOME} # Hive Configuration Directory can be controlled by: export HIVE_CONF_DIR=${HIVE_CONF_DIR} # Folder containing extra ibraries required for hive compilation/execution can be controlled by: # export HIVE_AUX_JARS_PATH= ``` 我的hive-site.xml 配置信息: ``` [root@h1 conf]# cat hive-site.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <configuration> <!-- WARNING!!! This file is provided for documentation purposes ONLY! --> <!-- WARNING!!! Any changes you make to this file will be ignored by Hive. --> <!-- WARNING!!! You must make your changes in hive-site.xml instead. --> <!-- Hive Execution Parameters --> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://192.168.1.103:3306/hive?createDatabaseIfNotExist=true</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>root</value> <description>password to use against metastore database</description> </property> </configuration> ```
SSH框架应用的一个例子,不知道错在哪里,很郁闷
[b]开发环境:[/b] MyEclipse7+Tomcat5+MySQL5+Struts1.2+Hibernate3.2+Spring2.0 [b]相关代码:[/b] [color=indigo]index.jsp中代码:[/color] <body> <form action="addAdmin.do"> <input type="submit" value="OK" /> </form> </body> [color=indigo]AddAdmin.java代码:[/color] package edu.bhu.Kupid.actions; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import edu.bhu.Kupid.domain.Admins; import edu.bhu.Kupid.service.AdminsService; public class AddAdmin extends Action { private AdminsService admServer; public AdminsService getAdmServer() { return admServer; } public void setAdmServer(AdminsService admServer) { this.admServer = admServer; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ request.setCharacterEncoding("utf-8"); String loginname="admin"; String pwd="admin"; Admins adm=new Admins(); adm.setPwd(pwd); adm.setId("1234665"); adm.setLoginname(loginname); adm.setLevel(0); admServer.addAdmin(adm); return mapping.findForward("ok"); } } [color=indigo]AdminsService.java代码:[/color] package edu.bhu.Kupid.service; import java.util.List; import edu.bhu.Kupid.domain.Admins; public interface AdminsService { public void addAdmin(Admins adm); public List<Admins> findAdminsByName(String name); } [color=indigo]AdminsServiceImpl代码:[/color] package edu.bhu.Kupid.service; import java.util.List; import edu.bhu.Kupid.domain.Admins; import edu.bhu.Kupid.persist.AdminsDao; public class AdminsServiceImpl implements AdminsService { private AdminsDao admDao; public void addAdmin(Admins adm) { admDao.insert(adm); } public AdminsDao getAdmDao() { return admDao; } public void setAdmDao(AdminsDao admDao) { this.admDao = admDao; } public List<Admins> findAdminsByName(String name) { return null; } } [color=indigo]AdminsDao.java代码:[/color] package edu.bhu.Kupid.persist; import edu.bhu.Kupid.domain.Admins; public interface AdminsDao extends BaseDao<Admins,String>{ } [color=indigo]AdminsDaoImpl.java代码:[/color] package edu.bhu.Kupid.persist; import edu.bhu.Kupid.domain.Admins; import edu.bhu.Kupid.persist.BaseDaoImpl; public class AdminsDaoImpl extends BaseDaoImpl<Admins,String> implements AdminsDao { } [color=indigo]BaseDao.java代码:[/color] package edu.bhu.Kupid.persist; import java.io.Serializable; public interface BaseDao<T, PK extends Serializable> { public void insert(T entity); public void update(T entity); public void delete(T entity); public void deleteById(PK id); public T findById(PK id); } [color=indigo]BaseDaoImpl.java代码:[/color] package edu.bhu.Kupid.persist; import java.io.Serializable; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; public class BaseDaoImpl<T,PK extends Serializable> extends HibernateDaoSupport implements BaseDao<T, PK> { protected Class entityClass; public void delete(T entity) { getHibernateTemplate().delete(entity); } public void deleteById(PK id) { getHibernateTemplate().delete(getHibernateTemplate().get(entityClass, id)); } public T findById(PK id) { return (T)getHibernateTemplate().get(entityClass, id); } public void insert(T entity) { getHibernateTemplate().save(entity); } public void update(T entity) { getHibernateTemplate().update(entity); } } [color=indigo] Admins.java代码(这个BEAN的代码是利用MyEclipse的DBExplorer的Hibernate Reverse Engineering生成的)[/color] package edu.bhu.Kupid.domain; /** * Admins entity. @author MyEclipse Persistence Tools */ public class Admins implements java.io.Serializable { // Fields private String id; private String loginname; private String pwd; private Integer level; // Constructors /** default constructor */ public Admins() { } /** full constructor */ public Admins(String id, String loginname, String pwd, Integer level) { this.id = id; this.loginname = loginname; this.pwd = pwd; this.level = level; } // Property accessors public String getId() { return this.id; } public void setId(String id) { this.id = id; } public String getLoginname() { return this.loginname; } public void setLoginname(String loginname) { this.loginname = loginname; } public String getPwd() { return this.pwd; } public void setPwd(String pwd) { this.pwd = pwd; } public Integer getLevel() { return this.level; } public void setLevel(Integer level) { this.level = level; } } [color=indigo]Admins.hbm.xml代码:[/color] <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="edu.bhu.Kupid.domain.Admins" table="admins" catalog="graduation"> <id name="id" type="java.lang.String"> <column name="id" length="128" /> <generator class="uuid.hex" /> </id> <property name="loginname" type="java.lang.String"> <column name="loginname" length="20" not-null="true" /> </property> <property name="pwd" type="java.lang.String"> <column name="pwd" length="20" not-null="true" /> </property> <property name="level" type="java.lang.Integer"> <column name="level" not-null="true" /> </property> </class> </hibernate-mapping> [color=indigo]spring-admins.xml代码:[/color] <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="adminsDao" class="edu.bhu.Kupid.persist.AdminsDaoImpl" parent="baseDao"> </bean> <bean id="adminsServer" class="edu.bhu.Kupid.service.AdminsServiceImpl"> <property name="admDao"> <ref bean="adminsDao"/> </property> </bean> <bean name="/addAdmin" class="edu.bhu.Kupid.actions.AddAdmin"> <property name="admServer"> <ref bean="adminsServer" /> </property> </bean> </beans> [color=indigo] applicationContext.xml代码:[/color] <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <import resource="spring-admins.xml" /> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location"> <value>/WEB-INF/classes/configure.properties</value> </property> </bean> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName"> <value>${jdbc.driverClassName}</value> </property> <property name="url"> <value>${jdbc.url}</value> </property> <property name="username"> <value>${jdbc.username}</value> </property> <property name="password"> <value>${jdbc.password}</value> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="mappingResources"> <list> <value>/edu/bhu/Kupid/domain/Admins.hbm.xml </value> <!-- 好多好多Hibernate --> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> ${hibernate.dialect} </prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.format_sql">true</prop> </props> </property> </bean> <bean id="baseDao" class="edu.bhu.Kupid.persist.BaseDaoImpl" abstract="true"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> </beans> [color=indigo]struts-config.xml代码:[/color] <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"> <struts-config> <data-sources /> <form-beans /> <global-exceptions /> <global-forwards /> <action-mappings > <action path="/addAdmin" type="edu.bhu.Kupid.actions.AddAdmin" validate="false" > <forward name="ok" path="/ok.jsp" ></forward> </action> </action-mappings> <message-resources parameter="edu.bhu.Kupid.resource.ApplicationResources" /> </struts-config> [color=indigo]web.xml代码:[/color] <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/classes/applicationContext.xml</param-value> </context-param> <servlet> <servlet-name>SpringContextServlet</servlet-name> <servlet-class> org.springframework.web.context.ContextLoaderServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <filter> <filter-name>OpenSessionInView</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> <init-param> <param-name>singleSession</param-name> <param-value>false</param-value> </init-param> </filter> <filter-mapping> <filter-name>OpenSessionInView</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> [b]程序目的:[/b] index.jsp上的按钮被点击后,一条Admin的信息入库。 [b] 产生错误:[/b] 浏览器中错误信息: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:173) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) root cause java.lang.NullPointerException edu.bhu.Kupid.actions.AddAdmin.execute(AddAdmin.java:37) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:173) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs. Apache Tomcat/5.0.30 MyEclipse中错误信息: 无。 最后感谢您的帮助。祝您好运。棘手问题郁闷中。。。 [b]问题补充:[/b] AddAdmin第37行是:admServer.addAdmin(adm); [b]问题补充:[/b] 我说的嘛,怎么出空指针,昨天晚上做了这样一个试验: 注释掉原来37行的代码,然后手工创建spring上下文,就能通过。果然是SSH整合中有错误。 //admServer.addAdmin(adm); ApplicationContext ctx=new ClassPathXmlApplicationContext(new String[] {"applicationContext.xml"}); AdminsService admServer=(AdminsService)ctx.getBean("adminsServer"); admServer.addAdmin(adm); 我是第一次做SSH,不太会弄,请各位多指教。 现在还有一个很头疼的地方,就是struts,我用了tiles来做页面的分帧,于是给struts-config.xml文件加入了 <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" contentType="text/html; charset=UTF-8" /> <message-resources parameter="edu.bhu.Kupid.resource.ApplicationResources" /> <plug-in className="org.apache.struts.tiles.TilesPlugin"> <set-property property="definitions-config" value="/WEB-INF/tiles-config.xml" /> </plug-in> 结果这段代码一加进来,jsp提交表单到action的时候就找不到action了,浏览器报404异常。 PS:回lewhwa :因为有一次我发项目,有个仁兄说下载太麻烦,不如直接贴代码的好,于是我就贴了代码。。。
rails to_xls插件的使用
<p><br><img src="http://dl.iteye.com/upload/attachment/198890/8780c5d9-b3a3-3d56-bd1c-e7867f59ff5a.png" alt=""></p>   <p>在地址栏输入<br>http://localhost:3000/admins.xls<br>可以获取xls文件,并且是下载形式的!<br><br> @accounts = Account.find(:all, :limit =&gt; 500)<br>    respond_to do |format|<br>      format.html<br>      format.xls { send_data @accounts.to_xls }<br>    end<br>想让其单击"导出文档"链接来提供xls文件下载,所以单独写了个action</p> <pre name="code" class="ruby">def create_xls respond_to do |format| format.xls{send_data @accounts.to_xls} end</pre> <p> 但是导出的就是不xls文件的为后缀了!</p> <p> </p> <p> </p> <p>还有,我这个控制器在app/controller/admin/admin_accounts/crete_xls 我想这不会影响到插件的使用吧!</p> <p>实验成功的是新建的一个test应用,在地址栏用后缀获取是成功的。<br><img src="http://dl.iteye.com/upload/attachment/198882/d10f50bf-331e-3763-b74e-692441313619.png" alt=""></p>
Watashi and Kimi
In the year of 2010, "Watashi" and "Kimi" become the admins of ZOJ. They are twins, but "Kimi" always does the right things while "Watashi" always does the wrong things. The online contest "ZOJ Weekly" is scheduled in tomorrow. There will be N problems in this contest, and "Watashi" and "Kimi" are busy checking the the data for all the problems. After "Kimi" checks the data of a problem, the data will always be right, but After "Watashi" checks the data of a problem, the data will always be wrong! In each turn when "Watashi" or "Kimi" checks, he will first choose a problem to check. Either of them will never choose the problems which he can make sure is most recently checked by himself (not by the other one). He will then randomly choose a problem in the candidate problems, and checks the data for that problem. So when either of them is sure that all the problems are lately checked by himself, he will do nothing. Given the order in which they check the problems, you are to print the probability that all the data are right after all the checks made by them. Initially, all the problems have been checked by "Kimi" so all of them are right at first. And both of them know when the other one checks the data, but they can't see which problem the other one is checking. Input There are multiple test cases. There are two parts for each case. The first part is one line with an integer N (1 <= N <= 16), the number of problems for the contest. The second part consists with some lines. A line will be either "Watashi" or "Kimi", which means a check made by "Watashi" or a check made by "Kimi". This part ends with a line with "End". There will be at most 100 lines for the second part. Output For each case, print a real number in one line, the probability that all the data are right after all the checks made by them. Keep two digits after the decimal point. Sample Input 2 Watashi End 3 Watashi Kimi End Sample Output 0.00 0.33
namespace和webroot下文件夹同名出现的问题
<package name="admin" namespace="/admin" extends="struts-default" > <default-action-ref name="index"/> <action name="index" > <result>/admin/a.jsp</result> </action> </package> 如我配置了一个namespace叫/admin,然后在webroot下也有一个文件夹是admin(即webapps 里的项目里也有个admin文件夹)。 在浏览器里你直接输入一个XX/XX/admin则tomcat会直接帮你添加为XX/XX/admin/ 当然如果你的struts.xml如果没有对应的/admin/的话会报错. 如果你在这个这个package里用了<default-action-ref name="xx"/>这样一个配置话当然会报错了。理由如上。 所以我有想到把namespace给改了下。改为admins。 <package name="admin" namespace="/admins" extends="struts-default" > 但是如果你跳转到webroot下的/admin/a.jsp 而这个JSP又调用了该文件夹里的JS文件话。则不会调用。 求原理。
hibernate 动态查询
我做得一个struts+hibernate的项目,有一个问题是这样的:student(学生持久化类),team(班级持久化类),academy(学院持久化类),student和team是一对多关系,team和Academy是一对多关系,student和Academy没有直接的关系。现在我想做一个动态查询,其中一段代码是这样的。 下面的代码很多,但是粗略看一下就行,不用一句一句的看 /** * 根据条件查询 */ public List byStudent(String sno,String sname,String classid,int academyid){ Criteria critera = getSession().createCriteria(Student.class);//里面是一个class对象,而不是HQL if(sno!=null&&!sno.equals("")){//如果equals在前面的话,容易报 nullpoint 异常 critera.add(Restrictions.like("sno", sno,MatchMode.ANYWHERE)); //如果是进行模糊查询的话,就要加一个参数,MatchMode.ANYWHERE ,否则就不能进行模糊查询 } if(sname!=null&&!sname.equals("")){ critera.add(Restrictions.like("sname", sname,MatchMode.ANYWHERE)); } if(address!=null&&!address.equals("")){ critera.add(Restrictions.like("address", address,MatchMode.ANYWHERE)); } if(classid!=0){ critera.add(Restrictions.eq("classes.cid",new Integer(classid))); } if(academyid!=0){ critera.add(Restrictions.like("academyid",new Integer(academyid)); } return critera.list(); } 问题是这样的,那个academyid也是需要进行动态查询的,但是critera.add(Restrictions.eq("?",new Integer(academyid)));这里的问好我不知道该填写什么,请大家帮一下 [b]问题补充:[/b] 别人贴出的代码都是截图,具体是怎样实现的? [b]问题补充:[/b] [code="java"]public class Student implements java.io.Serializable { private String id; //hibernate主键id 学号 private String name; //学生姓名 private String psw; //登录密码 private Team team; //所在班级 private Grade grade; //所在年级 private Approve approve; //学生是否通过素质拓展认证 private ColumnOne columnOne; [/code] [b]问题补充:[/b] [code="java"]public class Team implements java.io.Serializable { private String id; private String name; private Set<Student> students = new HashSet<Student>(); private Academy academy;[/code] [b]问题补充:[/b] [code="java"]public class Academy implements java.io.Serializable { private String id; private String name; private Set<Admin> admins = new HashSet<Admin>(); private Set<Team> teams = new HashSet<Team>();[/code] [b]问题补充:[/b] 上面的代码参数可能和下面的有一定的不一样,大家尝试着看吧 [b]问题补充:[/b] 谢了,有点急。帮忙看一下 [b]问题补充:[/b] [code="java"]下面的代码很多,但是粗略看一下就行,不用一句一句的看 /** * 根据条件查询 */ public List byStudent(String sno,String sname,String classid,int academyid){ Criteria critera = getSession().createCriteria(Student.class);//里面是一个class对象,而不是HQL if(sno!=null&&!sno.equals("")){//如果equals在前面的话,容易报 nullpoint 异常 critera.add(Restrictions.like("sno", sno,MatchMode.ANYWHERE)); //如果是进行模糊查询的话,就要加一个参数,MatchMode.ANYWHERE ,否则就不能进行模糊查询 } if(sname!=null&&!sname.equals("")){ critera.add(Restrictions.like("sname", sname,MatchMode.ANYWHERE)); } if(address!=null&&!address.equals("")){ critera.add(Restrictions.like("address", address,MatchMode.ANYWHERE)); } if(classid!=0){ critera.add(Restrictions.eq("classes.sid",new Integer(classid))); } if(academyid!=0){ critera.add(Restrictions.like("academyid",new Integer(academyid)); } return critera.list(); } [/code] [b]问题补充:[/b] 全部的积分都压上了,帮一下吧 [b]问题补充:[/b] [code="java"]Criteria critera = getSession().createCriteria(Student.class); if(classid!=0){ Criteria classes = critera.createCriteria("team"); classes.add(Expression.eq("id", classid)); } return critera.list();[/code] 你这是什么意思啊,没看明白,classes并没有和critera 关联上。能再详细一点么,加上点注释。 [b]问题补充:[/b] to yourgame 你的方法我尝试了,不行啊。还有别的办法没?谢了 [code="java"]critera.add(Restrictions.eq("team.academy.id",new Integer(academyid))); [/code] [b]问题补充:[/b] [code="java"]javax.servlet.ServletException: org.hibernate.QueryException: could not resolve property: team.academy.id of: pojo.Student org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) utils.EncodingFilter.doFilter(EncodingFilter.java:25) root cause org.hibernate.QueryException: could not resolve property: team.academy.id of: pojo.Student org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43) org.hibernate.persister.entity.AbstractPropertyMapping.toColumns(AbstractPropertyMapping.java:63) org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:31) org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.java:1257) org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:433) org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection(CriteriaQueryTranslator.java:393) org.hibernate.criterion.SimpleExpression.toSqlString(SimpleExpression.java:45) org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:333) org.hibernate.loader.criteria.CriteriaJoinWalker.<init>(CriteriaJoinWalker.java:82) org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:67) org.hibernate.impl.SessionImpl.list(SessionImpl.java:1514) org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) dao.StudentDaoImpl.search(StudentDaoImpl.java:112) struts.action.StudentAction.search(StudentAction.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) utils.EncodingFilter.doFilter(EncodingFilter.java:25) [/code] 就是这个错误,我试过了,只要是属性(team.academy.i)与student中的属性不定应就会有这种错误, [b]问题补充:[/b] 这是StudentDaoImpl的代码,你看一看 [code="java"] public List search(String id,String name,String academyid,String teamid){ List students = null; Session sess = HibernateSessionFactory.getSession(); Transaction tran = sess.beginTransaction(); Criteria critera = sess.createCriteria(Student.class); if(!"".equals(id)&&id!=null){ critera.add(Restrictions.eq("id",id)); } if(!"".equals(name)&&name!=null){ critera.add(Restrictions.eq("name",name)); } if(!"".equals(teamid)&&teamid!=null){ critera.add(Restrictions.eq("team.id",teamid)); } if(!"".equals(academyid)&&academyid!=null){ critera.add(Restrictions.eq("team.academy.id",academyid)); } students = critera.list(); tran.commit(); sess.close(); return students; }[/code]
谁能帮我解释一下下面这个struts配置文件么?完全看不懂啊。
[code="java"] <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <!-- Constants --> <include file="struts-config-*.xml"></include> <constant name="struts.devMode" value="false" /> <constant name="struts.i18n.encoding" value="UTF-8" /> <constant name="struts.action.extension" value="html" /> <constant name="struts.objectFactory" value="spring" /> <constant name="struts.custom.i18n.resources" value="ApplicationResources,errors" /> <constant name="struts.multipart.maxSize" value="10485760" /> <constant name="struts.ui.theme" value="css_xhtml" /> <constant name="struts.codebehind.pathPrefix" value="/WEB-INF/pages/" /> <constant name="struts.enable.SlashesInActionNames" value="true" /> <constant name="struts.convention.action.disableScanning" value="true" /> <!-- Configuration for the default package. --> <package name="default" extends="struts-default"> <interceptors> <!-- Interceptor to handle allowing only admins to certain actions --> <interceptor name="adminOnly" class="adminInterceptor" /> <!--Copied from struts-default.xml and changed validation exclude methods --> <interceptor-stack name="defaultStack"> <interceptor-ref name="exception" /> <interceptor-ref name="alias" /> <interceptor-ref name="servletConfig" /> <interceptor-ref name="prepare" /> <interceptor-ref name="i18n" /> <interceptor-ref name="chain" /> <interceptor-ref name="debugging" /> <interceptor-ref name="profiling" /> <interceptor-ref name="scopedModelDriven" /> <interceptor-ref name="modelDriven" /> <interceptor-ref name="fileUpload" /> <interceptor-ref name="checkbox" /> <interceptor-ref name="staticParams" /> <interceptor-ref name="params"> <param name="excludeParams">dojo\..*</param> </interceptor-ref> <interceptor-ref name="conversionError" /> <interceptor-ref name="validation"> <param name="excludeMethods">cancel,execute,delete,edit,list</param> </interceptor-ref> <interceptor-ref name="workflow"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> </interceptor-stack> <interceptor-stack name="fileUploadStack"> <interceptor-ref name="fileUpload" /> <interceptor-ref name="defaultStack" /> </interceptor-stack> <interceptor-stack name="adminCheck"> <interceptor-ref name="defaultStack" /> <interceptor-ref name="adminOnly" /> </interceptor-stack> </interceptors> <global-results> <result name="mainMenu" type="redirectAction">index</result> <result name="dataAccessFailure">/WEB-INF/pages/dataAccessFailure.jsp</result> </global-results> <global-exception-mappings> <exception-mapping exception="org.springframework.dao.DataAccessException" result="dataAccessFailure" /> </global-exception-mappings> <action name="mainMenu"> <result name="success">/WEB-INF/pages/index.jsp</result> </action> <action name="signup" class="signupAction"> <result name="cancel" type="redirect">/</result> <result name="input">/WEB-INF/pages/signup.jsp</result> <result name="success" type="chain">saveSignup</result> </action> <action name="saveSignup" class="signupAction" method="save"> <result name="input">/WEB-INF/pages/signup.jsp</result> <result name="success" type="redirectAction">/mainMenu</result> </action> <action name="editUser" class="userAction" method="edit"> <interceptor-ref name="adminCheck" /> <result name="success">/WEB-INF/pages/userForm.jsp</result> <result name="input">/WEB-INF/pages/admin/userList.jsp</result> </action> <action name="editProfile" class="userAction" method="edit"> <result name="success">/WEB-INF/pages/userForm.jsp</result> <result name="error">/WEB-INF/pages/mainMenu.jsp</result> </action> <action name="saveUser" class="userAction" method="save"> <result name="cancel" type="redirectAction">admin/users</result> <result name="input">/WEB-INF/pages/userForm.jsp</result> <result name="success" type="redirectAction">admin/users</result> </action> <action name="queryTargetUsers" class="com.asb.oas.webapp.action.UserAction" method="queryUser"> <result name="success" type="stream"> <param name="contentCharSet">GBK</param> </result> </action> <!-- action name="uploadFile" class="com.asb.oas.webapp.action.FileUploadAction"> <interceptor-ref name="fileUploadStack" /> <result name="input">/WEB-INF/pages/uploadForm.jsp</result> <result name="success">/WEB-INF/pages/uploadDisplay.jsp</result> <result name="cancel" type="redirectAction">mainMenu</result> </action --> <action name="passwordHint" class="passwordHintAction"> <result name="input">/</result> <result name="success">/</result> </action> <action name="index" class="signupAction" method="index"> <result>/WEB-INF/pages/index.jsp</result> </action> [/code] 这是从别人的项目里贴过来的,我自己的项目的struts完全没这么复杂啊.谁帮我解释一下,或者指条明路。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
漫话:什么是平衡(AVL)树?这应该是把AVL树讲的最好的文章了
这篇文章通过对话的形式,由浅入深带你读懂 AVL 树,看完让你保证理解 AVL 树的各种操作,如果觉得不错,别吝啬你的赞哦。 1、若它的左子树不为空,则左子树上所有的节点值都小于它的根节点值。 2、若它的右子树不为空,则右子树上所有的节点值均大于它的根节点值。 3、它的左右子树也分别可以充当为二叉查找树。 例如: 例如,我现在想要查找数值为14的节点。由于二叉查找树的特性,我们可...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
开源并不是你认为的那些事
点击上方蓝字 关注我们开源之道导读所以 ————想要理清开源是什么?先要厘清开源不是什么,名正言顺是句中国的古代成语,概念本身的理解非常之重要。大部分生物多样性的起源,...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC...
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下...
《C++ Primer》学习笔记(六):C++模块设计——函数
专栏C++学习笔记 《C++ Primer》学习笔记/习题答案 总目录 https://blog.csdn.net/TeFuirnever/article/details/100700212 —————————————————————————————————————————————————————— 《C++ Primer》习题参考答案:第6章 - C++模块设计——函数 文章目录专栏C+...
8年经验面试官详解 Java 面试秘诀
作者 |胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。 Java程序员准备和投递简历的实...
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车?某胡同口的煎饼摊一年能卖出多少个煎饼?深圳有多少个产品经理?一辆公交车里能装下多少个乒乓球?一个正常成年人有多少根头发?这类估算问题,被称为费米问题,是以科学家费米命名的。为什么面试会问这种问题呢?这类问题能把两类人清楚地区分出来。一类是具有文科思维的人,擅长赞叹和模糊想象,它主要依靠的是人的第一反应和直觉,比如小孩...
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。 背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法 不过,当我看了源代码之后 这程序不到50行 尽管我有多年的Python经验,但我竟然一时也没有看懂 当然啦,原作者也说了,这个代码也是在无聊中诞生的,平时撸码是不写中文变量名的, 中文...
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的回答,对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalking,作者吴晟、刘浩杨 等等 仓库地址: apache/skywalking 更...
MySQL数据库总结
一、数据库简介 数据库(Database,DB)是按照数据结构来组织,存储和管理数据的仓库。 典型特征:数据的结构化、数据间的共享、减少数据的冗余度,数据的独立性。 关系型数据库:使用关系模型把数据组织到数据表(table)中。现实世界可以用数据来描述。 主流的关系型数据库产品:Oracle(Oracle)、DB2(IBM)、SQL Server(MS)、MySQL(Oracle)。 数据表:数...
相关热词 c# 输入ip c# 乱码 报表 c#选择结构应用基本算法 c# 收到udp包后回包 c#oracle 头文件 c# 序列化对象 自定义 c# tcp 心跳 c# ice连接服务端 c# md5 解密 c# 文字导航控件
立即提问