创建名为“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问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
fabric 创建通道失败:hyperledger fabric在创建peer通道时出现this policy requires 1 of the 'Writers' sub-policies to be……

https://blog.csdn.net/qq_42947242/article/details/103872613 请教,这是什么原因呢!非常感谢!!!

sonata管理包中的一个模型的不同列表

<div class="post-text" itemprop="text"> <p>How can I create two different lists for one model? In my case I have one model User. And for this model in my dashboard I must have two lists: Members and Admins. I create for members:</p> <pre><code>sonata.admin.members: class: Project\AdminBundle\Admin\MemberAdmin tags: - { name: sonata.admin, manager_type: orm, model_manager: sonata.admin.manager.project, group: Members, label: Members} arguments: [null, %fos_user.model.user.class%, SonataAdminBundle:CRUD] calls: - [setTranslationDomain, [ProjectUserBundle]] </code></pre> <p>and for admins:</p> <pre><code>sonata.admin.user: class: Project\UserBundle\Admin\UserAdmin tags: - { name: sonata.admin, manager_type: orm, model_manager: sonata.admin.manager.project, group: Admins, label: Admin Users} arguments: [null, %fos_user.model.user.class%, ProjectUserBundle:CRUD] calls: - [setTranslationDomain, [ProjectUserBundle]] </code></pre> <p>So, I have two tabs in admin panel, but it has one url, and work only with one Admin class. </p> <p>Any ideas?</p> </div>

合并2个表字段并插入同一记录中的另一个字段

<div class="post-text" itemprop="text"> <p>I am not sure if what I am trying to do is even possible but, if it is, I am obviously not Googling properly and would appreciate any assistance I can get here, even if it is just a link to an "Idiot Guide".</p> <p>Okay, at the moment, I have a database table of 150-odd records. Each record contains basic details (name, location, contact information, etc.) and login credentials (UserID, password, et al). These details are captured by the website admins (i.e. no general public registration) after the prospective user has undergone a successful interview process. When a record is created, a 6-char "username prefix" is assigned to the user (e.g. 'UNPREF') and this, along with the auto-incremental UserID (e.g. 125), is used as the username (e.g. UNPREF125) to log into the website. However, the username is not actually stored in the the database. Instead, when a user logs in, the login script splits the provided username and the two chunks are checked against their relevant fields.</p> <p>In addition to this primary user table, there are a number of other tables which contain additional information (for instance, educational qualifications, work history, etc), which are linked to the user by means of the UserID, as per the primary table. Now, both users and admins can update a user's data and, therefore, I have created a field for each row that logs who last modified the record (<code>modby</code>) and when (<code>modon</code>) so that, if there are any shenanigans, I can ascertain who fiddled last and, in theory, deal with that particular individual without any "he said/she said" nonsense.</p> <p>Now here is the tricky bit. My users and admins are stored in separate databases on separate servers (the latter being beyond my control) but I have recently discovered the joys of Federated Tables, which work brilliantly. One small quirk, tho; because my users and admins are stored in separate databases and because I want to maximise the number of records I can store in a single database (there is a size limit of 100mb per database), with the company's current rate of expansion and each branch requiring two admin accounts, it is not an improbable scenario that a user and an admin will end up with the same UserID. Therefore, the <code>modby</code> fields store the full username (i.e. UNPREF125 - admins get their own, unique Username Prefix so as to differentiate between admins and users)</p> <p>Now, perhaps it is because I am such a newbie at Federated Tables but I can't seem to find a way to compare a field in a table on Server A (i.e. <code>modby</code>) with 2 separate fields (i.e. <code>unprefix</code> and <code>userid</code>) in the Federated Table, called from Server B, but I have come up with a workaround by creating an additional field in Server B's table, namely <code>username</code>, which stores the merged values (namely 'DBPREF125') and <code>modby</code> is checked against this instead, which works fine (I'm sure there is an easier way but I will save that lesson for another time).</p> <p>Now, here is my question. The admin table is currently small (only 26 records) and so I captured the usernames manually, using phpMyAdmin, but I would prefer to avoid having to manually create usernames for the 150+ records in my users table. Is there any way I can get MySQL to pull the values of the <code>userid</code> and <code>unprefix</code> fields, join them together and store the result into the <code>username</code> field of the same record or would I need to turn to PHP for this and, if so, how would I go about this?</p> <p>I apologise for the length of my question but I hope this will help explain why Google was <em>not</em> my friend today.</p> <p>Many thanks in advance.</p> </div>

Laravel App - 仅限管理员路线'/ admin'将始终返回404错误| '/ admins'或其他任何工作

<div class="post-text" itemprop="text"> <p>So if you <a href="https://laracasts.com/discuss/channels/laravel/when-routes-url-is-admin-it-results-in-404" rel="nofollow noreferrer">go here</a> you will see the EXACT SAME ISSUE word for word that i'm having...</p> <p>Basically I have the admin route set like this:</p> <pre><code>Route::get('/admin', function () { return view('admin.app'); }); </code></pre> <p>Simple enough right? It always returns this error here:</p> <blockquote> <p>Not Found</p> <p>The requested URL /admin/ was not found on this server.</p> </blockquote> <p>If i change the route to <code>/admins</code> (plural) or really <strong>anything</strong> else, even <code>/test</code> the route displays properly.</p> <p>I DID have an admin folder inside my public folder, but I have since deleted the admin folder and now the problem is still persisting. I don't really understand why. I'm running on a Laravel/Homestead environment. Basic LEMP stack. Nothing special.</p> <p>Edit: When i type in mysite.dev:8000/admin it directs me automatically to mysite.dev/admin (Notice there is no port) So, now i'm really even more confused. :/</p> <p>Edit 2: Changed the route to <code>admin/dashboard</code> works just fine. Could it be possible that Laravel has defined the <code>/admin</code> route as a 'reserved route' or something (similar to reserved keywords in any programming language) to where it won't ever display anything? Is that even a thing?</p> <pre><code>Route::get('admin/dashboard', function () { return view('admin.app'); }); </code></pre> <p>Any ideas?</p> </div>

Wordpress:CalderaWP将MySQL字段值存储为字符串“Array”。 如何用$ wpdb解析?

<div class="post-text" itemprop="text"> <p>I've built a survey site with Wordpress and CalderaWP forms and I'm running into an issue with the data storage for checkbox field values. My concern is that the data for these types of form submissions are being stored in the MySQL database as the string, "Array". Here is an example:</p> <p><a href="https://i.stack.imgur.com/QLikN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QLikN.png" alt="enter image description here"></a></p> <p>I have a number of things I'd like to do with this data, such as export it to a csv file, allow admins to change values via custom fields, etc. and in every front end form I've created the value shows up as the string, "Array". Here is a shot of one of the custom fields:</p> <p><a href="https://i.stack.imgur.com/dF9Kq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dF9Kq.png" alt="enter image description here"></a></p> <p>I've decided to write a wp cron that reformats this data into a front-end, usable format. The first part is getting the data and converting it. I've managed to use the $wpdb object to get all the fields that have the value "Array". It looks like this:</p> <pre><code>function reformat_mysql_arrays() { global $wpdb; $table_name = '`wp_mydatabase`.`wp_cf_form_entry_values`'; $results = $wpdb-&gt;get_results("SELECT * FROM $table_name WHERE `value` LIKE 'Array' "); // Loop through the rows for the query foreach($results as $key =&gt; $row) { // Loop through the current row's columns foreach($row as $column =&gt; $value) { if($column == 'id') { echo 'ID: ' . $value . ' | '; } if($column == 'value') { var_dump($value); } } }// END foreach column loop } reformat_mysql_arrays(); </code></pre> <p>My concern is that when I <code>var_dump()</code> the field value from the 'value' column, it appears to literally be the string, "Array", rather than an array I can parse. Here's a screen shot of the output of this function:</p> <p><a href="https://i.stack.imgur.com/1ReQ4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1ReQ4.png" alt="enter image description here"></a></p> <p>I've attempted every way I can think of to parse the values -- explode, implode, foreach, unserialize, array_values, etc. -- and I still cannot get any value out of the apparent array. Any help would be greatly appreciated. Am I missing something here?</p> </div>

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

Laravel 5路由到CSS文件夹问题

<div class="post-text" itemprop="text"> <p>I have the following route which loads the page but the <code>css</code> of the page doesn't loads.</p> <pre><code>Route::get('admins', function () { return view('admins/index'); }); </code></pre> <p>In the contrast the following route loads the same page but here I added <code>index</code> and the page loads correctly. but I also adds <code>index</code> with <code>admins</code> in the browser address bar.</p> <pre><code>Route::get('admins/index', function () { return view('admins/index'); }); </code></pre> <p>I am calling <code>css</code> files in the views like:</p> <pre><code>&lt;link href="../assets/css/animate.min.css" rel="stylesheet" /&gt; </code></pre> <p>I searched for the solutions but didn't got anything.</p> </div>

Spring3 security tomcat 启动报错

报错信息: 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot resolve reference to bean 'userLoginFilter' while setting constructor argument with key [4]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userLoginFilter' defined in class path resource [spring-security.xml]: Cannot resolve reference to bean 'userLoginAuthenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0': Cannot resolve reference to bean 'loginUserDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginUserDetailsService' defined in class path resource [spring-security.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:610) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Web.xml 相关配置: <!-- 配置监听 --> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <!-- Spring Security1 --> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> spring-security.xml的相关配置 <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="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-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd" default-lazy-init="true"> <http use-expressions="true" auto-config='true'> <form-login login-page="/login.jsp" authentication-failure-url="/accessDenied.jsp" /> <http-basic /> <logout invalidate-session="true" logout-success-url="/login.jsp?login_error=succLogout" logout-url="/userOut.html" /> <!-- 防止多个用户同时登陆一个账号 --> <session-management> <concurrency-control max-sessions="1" error-if-maximum-exceeded="false"/> </session-management> <!-- 认证 --> <custom-filter ref="userLoginFilter" before="FORM_LOGIN_FILTER"/> </http> <!-- 配置过滤器 --> <beans:bean id="userLoginFilter" class="com.smile.common.filter.userlogin.UserLoginFilter"> <beans:property name="filterProcessesUrl" value="/login.do"></beans:property> <beans:property name="authenticationManager" ref="userLoginAuthenticationManager"></beans:property> </beans:bean> <authentication-manager alias="userLoginAuthenticationManager"> <authentication-provider user-service-ref="loginUserDetailsService" /> </authentication-manager> <beans:bean id="loginUserDetailsService"> <beans:property name="target"> <beans:bean class="com.smile.service.user.UserDetailServiceImpl"> <beans:property name="userDAO" ref="userDAO"></beans:property> </beans:bean> </beans:property> </beans:bean> </beans:beans>

为什么此登录和注册系统未正确检查密码?

<div class="post-text" itemprop="text"> <p>Basically I am having issues with hashing and getting the password verified, and I was hoping someone could help me out by proof reading some of the code.</p> <p>Below is the registration (php code):</p> <pre><code>include '../includes/connection.php'; $userID = $_POST['userID']; $userName = $_POST['userName']; $Pass = $_POST['password']; $encrypted_password = password_hash($Pass, PASSWORD_DEFAULT); if(!empty($userName) &amp;&amp; !empty($Pass) &amp;&amp; !empty($userID)){ $records = "SELECT * FROM Admins WHERE ID='$userID' OR Username='$userName' OR Password='$encrypted_password'"; $results = mysqli_query($connect,$records); if ($results-&gt;num_rows == 1){ $message = "You have already requested an account."; echo "&lt;script type='text/javascript'&gt;alert('$message');&lt;/script&gt;"; }else{ $query = "INSERT INTO Admins (`ID`,`Username`,`Password`,`AdminLevel`) VALUES ('$userID','$userName','$encrypted_password','0')"; $run = mysqli_query($connect,$query); $message = "Your request has been submitted."; echo "&lt;script type='text/javascript'&gt;alert('$message');&lt;/script&gt;"; } } </code></pre> <p>Below is the login (php code)</p> <pre><code>if(!empty($userName) &amp;&amp; !empty($Pass)){ $sql = "SELECT * FROM Admins WHERE Username='$userName'"; $sqlr = mysqli_query($connect,$sql); $sqlrow = $sqlr-&gt;fetch_assoc(); $dbPass = $sqlrow['Password']; $hash = password_verify($Pass, $dbPass); if ($hash == 0){ die("There was no password found matching what you have entered."); }else{ $records = "SELECT * FROM Admins WHERE Username='$userName' AND Password='$hash'"; $results = mysqli_query($connect,$records); if ($results-&gt;num_rows == 1){ $row = $results-&gt;fetch_assoc(); $_SESSION['user_id'] = $row['ID']; $_SESSION['admin_level'] = $row['AdminLevel']; $_SESSION['user_name'] = $row['Username']; $easyName = $_SESSION['user_name']; $recordsS = "UPDATE `Admins` SET Status='1' WHERE Username='$userName'"; $resultsS = mysqli_query($connect,$recordsS); header("Location: index.php"); }else{ die("Sorry... you have entered incorrect login information."); } } } </code></pre> <p>This is the database heading: <a href="https://gyazo.com/69380c5cd0df0259d31799b71f33ce47" rel="nofollow">https://gyazo.com/69380c5cd0df0259d31799b71f33ce47</a></p> <p>When I test this on the website and I login with correct information, "Sorry... you have entered incorrect login information." is echoed. </p> <p>If I login with false information, "There was no password found matching what you have entered." is echoed. </p> <p>Why can it detect the password, but not properly execute the else statement in the login section?</p> </div>

Laravel 5.4 Multi auth - Auth :: guard() - > user()为空

<div class="post-text" itemprop="text"> <p>I've created a multi auth test in Laravel 5.4. It's using custom middlewares, custom Eloquent providers, etc. The auth flow is working, I can login in both ways. But if the user is signed in, in the home controller when I want to check the user with <code>Auth::user()</code> or <code>Auth::guard()-&gt;user()</code>, it's empty. The <code>Auth::guard()</code> is empty as well. But I don't understand, why?! It should contains the signed in user instance, shouldn't it?</p> <p>Also the <code>$request-&gt;getUserResolver()</code> says that the guard is null... o.O</p> <p>What did I do wrong?</p> <p><a href="https://github.com/SasSam/laravel-54-multi-auth-test" rel="nofollow noreferrer">Here it is</a> my test repo, if you want to check my code.</p> <p>Thank you in advance!</p> <p>Edit 1:</p> <p>In the <code>\app\Http\Controllers\Employee\HomeController.php</code> the <code>Auth::guard()-&gt;user()</code> and the <code>Auth::user()</code> are empty.</p> <pre><code>namespace App\Http\Controllers\Employee; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class HomeController extends Controller { public function __construct(Request $request) { $this-&gt;middleware('auth.employee:employee'); } public function index(Request $request) { $users[] = Auth::user(); $users[] = Auth::guard()-&gt;user(); $users[] = Auth::guard('employee')-&gt;user(); dd($users); return view('employees.home.index'); } } </code></pre> </div>

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)

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>

使用MySQL创建一个php变量

<div class="post-text" itemprop="text"> <p>I have a Problem and I don't know how to solve it. I try to make a simple if statement with a php variable. The Variable contains a MySQL SELECT value.</p> <pre><code>$adminarray = $mysqli-&gt;query("SELECT admin FROM user WHERE name LIKE '$username'"); $currentuser = mysqli_fetch_row($adminarray); $adm = $currentuser[0]; echo "&lt;form action='?delete1' method='post' style='visibility:";if ($adm = 1){echo "block";}else{echo "hidden";}echo "'&gt; </code></pre> <p>I try to hide the button for non admins ($adm = 0) but it is not working. The IF Statemant always returns a "true". even if $adm is 0.</p> <p>I know the code isn't that good, but I'm still learning. So if you can give some tips :)</p> <p>Thanks for answering</p> </div>

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); } } ```

CodeIgniter return尝试获取非对象的属性

<div class="post-text" itemprop="text"> <p>I've made an application in <code>CodeIgniter</code> this working in locally and now I want to try in on a hosting: <code>hostinger</code>. If you want see, <a href="http://primodebug.esy.es/Calendario/" rel="nofollow">check</a> this. Now the problem's that when the I perform the installation of the library I get the error on the bottom from the code below:</p> <pre><code>public function get_admin_role_id() { $result = intval($this-&gt;db-&gt;get_where('ea_roles', array('slug' =&gt; DB_SLUG_ADMIN))-&gt;row()-&gt;id); print_r($result); return $result; } </code></pre> <blockquote> <p>A PHP Error was encountered</p> <p>Severity: Notice</p> <p>Message: Trying to get property of non-object</p> <p>Filename: models/admins_model.php</p> <p>Line Number: 372</p> </blockquote> <p>Now this code should be returned the id roles of admin that is setted to default to <code>1</code>. Now the installation is also involved in creating the structure of the tables and logging in phpMyAdmin seems that the database is still empty, perhaps this could be the cause of the problem? Can someone help me understand what's going on?</p> <p><a href="http://pastebin.com/kShtzzsK" rel="nofollow">Complete admin model</a></p> </div>

遍历结构并执行数据库查询

<div class="post-text" itemprop="text"> <p>So I'm new to go and I come from a javascript/node background and for practice, I've been rewriting some of my javascript code into go.</p> <p>I have a situation where I have an struct (in node it was my object) and I need to iterate over it and perform two database queries. I have something that works but it seems costly and repetitive.</p> <p><strong>Struct:</strong></p> <pre><code>type SiteUsers struct { Active struct { Moderators []string `json:"moderators"` Admins []string `json:"admins"` Regulars []string `json:"regulars"` } `json:"active"` } </code></pre> <p>Then in the function where I handle an api request that returns JSON binded to this struct I use a for range loop for each role under active. For each one I perform the same first query and then a second one that is specific to each one.</p> <pre><code>v := getSiteUsers(&amp;usrs, website) for _, moderators := range v.Active.Moderators { // Insert into user table // Insert into user table with role of moderator } for _, admins := range v.Active.Admins { // Insert into user table // Insert into user table with role of admin } for _, regulars := range v.Active.Regulars { // Insert into user table // Insert into user table with role of regular } </code></pre> <p>This method will work but it doesn't feel completely right and I would love to get some input from people experienced with go.</p> </div>

根据标签类验证字段

<div class="post-text" itemprop="text"> <p>I'm setting up dynamic form fields that admins can add questions to the form themselves and have us not worry about adding anything.</p> <p>These are fairly simple questions and are going to be validated just in the ajax validation script and amended to the current error message. (no real need for php validation, I'd love to add this but I just can't get the cvalidation working for fields that are added dynamically)</p> <p>The issue I'm having is aiming at the custom class I've put in the label for every field that has the required class applied to it. In this case it's "required label". </p> <p>My guess to just have a blanket look at the label is..</p> <pre><code> 'afterValidate'=&gt;"js:function(form, data, hasError) { if(document.forms['user-form'].required-label.value == '') { $('&lt;li&gt;Field cannot be blank&lt;/li&gt;').appendTo('#user-form_es_'); $('.required-label').css( 'border-color', '#a94442 ' ); $('label[for=requiredField]').css('color','#a94442 '); } else { $('.required-label').css( 'border-color', '#3c763d ' ) ; $('label[for=.required-label]').css('color','#3c763d '); return true; } } </code></pre> <p>But the issue is that the value sits alongside the label, not under it. They are all nested in a form-group class.</p> <p>Any ideas how to target this label class or is there a better way to go about this?</p> <p>Edit. Should have noted, the obvious thing is to add required to the input element. The issue is that there is radio buttons and dropdowns that can be marked as required too. </p> </div>

在... vendor / longman / telegram-bot / src / Request.php中调用null上的成员函数getBotUsername()

<div class="post-text" itemprop="text"> <p>I'am trying to send a Telegram message with Telegram Bot (<code>longman/telegram-bot</code>) and <code>Laravel Lumen</code> jobs. </p> <p>So, first I'am install a Telegram bot with <code>composer require longman/telegram-bot</code> and add to composer.json <code>"Longman\\TelegramBot\\": "vendor/longman/telegram-bot/src"</code>. Then create a job</p> <pre><code>&lt;?php namespace App\Jobs; use Longman\TelegramBot\Request; use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Exception\TelegramException; class ProcessTelegramMessageJob extends Job { const TELEGRAM_API_KEY = 'BOTKEY'; const TELEGRAM_BOT_NAME = 'BOTNAME'; protected $telegram; protected $data; public function __construct($data) { $this-&gt;data = $data; try { $this-&gt;telegram = new Telegram(self::TELEGRAM_API_KEY, self::TELEGRAM_BOT_NAME); $this-&gt;telegram-&gt;handle(); } catch (TelegramException $e) {} } public function handle() { $data = [ 'chat_id' =&gt; $this-&gt;data['user_id'], 'text' =&gt; $this-&gt;data['message'], ]; $result = Request::sendMessage($data); } } </code></pre> <p>But, when job try to dispatch, I see in log <code>Call to a member function getBotUsername() on null in ...vendor/longman/telegram-bot/src/Request.php</code>. As I understand Request is not see Telegram instance.</p> <p>How to fix this error? Thanks in advance!</p> <p>PS Dump of telegram object </p> <pre><code>O:28:"Longman\TelegramBot\Telegram":16:{s:10:"*version";s:6:"0.52.0";s:10:"*api_key";s:45:"Api key here";s:15:"*bot_username";s:13:"Bot name here";s:9:"*bot_id";s:9:"470649282";s:8:"*input";s:116:"{"id":1,"url":"cib","_pos":1,"is_vis":true,"deleted_at":null,"checked":false,"data":{"id":1,"_node":1,"head":"CIB"}}";s:17:"*commands_paths";a:1:{i:0;s:98:"/var/www/www-root/data/www/domain.com/vendor/longman/telegram-bot/src/Commands/SystemCommands";}s:9:"*update";O:35:"Longman\TelegramBot\Entities\Update":9:{s:2:"id";i:1;s:3:"url";s:3:"cib";s:4:"_pos";i:1;s:6:"is_vis";b:1;s:10:"deleted_at";N;s:7:"checked";b:0;s:4:"data";a:3:{s:2:"id";i:1;s:5:"_node";i:1;s:4:"head";s:3:"CIB";}s:8:"raw_data";a:7:{s:2:"id";i:1;s:3:"url";s:3:"cib";s:4:"_pos";i:1;s:6:"is_vis";b:1;s:10:"deleted_at";N;s:7:"checked";b:0;s:4:"data";a:3:{s:2:"id";i:1;s:5:"_node";i:1;s:4:"head";s:3:"CIB";}}s:12:"bot_username";s:13:"Bot name here";}s:14:"*upload_path";N;s:16:"*download_path";N;s:16:"*mysql_enabled";b:0;s:6:"*pdo";N;s:18:"*commands_config";a:0:{}s:14:"*admins_list";a:0:{}s:24:"*last_command_response";O:43:"Longman\TelegramBot\Entities\ServerResponse":4:{s:2:"ok";b:1;s:6:"result";b:1;s:8:"raw_data";a:2:{s:2:"ok";b:1;s:6:"result";b:1;}s:12:"bot_username";N;}s:16:"*botan_enabled";b:0;s:15:"*run_commands";b:0;} </code></pre> </div>

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

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

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

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

和黑客斗争的 6 天!

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

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

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

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

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

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

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

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

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

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

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

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

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

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

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

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

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

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

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

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

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

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

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中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多个条件是什么逻辑关系?条件判断在什么时候执...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

阿里面试官让我用Zk(Zookeeper)实现分布式锁

他可能没想到,我当场手写出来了

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

立即提问
相关内容推荐