会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132413个问题
JAVA 全系列/第三阶段:数据库编程/JDBC技术(旧) 10486楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/网络编程(旧) 10489楼

求老师给看看  这问题出在那了 为什么没有tank没有left属性,前面的都没问题,一按空格键发射子弹就报错了

"""
新增功能
    完成我方坦克发射子弹

"""
import pygame,time,random
SCREEN_WIDTH=1000
SCREEN_HEIGHT=800
BG_COLOR=pygame.Color(0,0,0)
TEXT_COLOR=pygame.Color(255,0,0)
class MainGame():
    window = None
    my_tank = None
    # 存储敌方坦克的列表
    enemyTankList=[]
    # 定义敌方坦克的数量
    enemyTankCount=5
    # 存储我方坦克发射子弹的列表
    myBulletList=[]
    def __init__(self):
        pass
    #开始游戏
    def startGame(self):
        # 加载主窗口
        pygame.display.init()
        # 设置窗口的大小及显示
        MainGame.window=pygame.display.set_mode([SCREEN_HEIGHT,SCREEN_HEIGHT])
        # 初始化我方坦克
        MainGame.my_tank = Tank(350, 250)
        #初始化敌方坦克,并将敌方坦克添加到列表中
        self.createEnemyTank()
        #设置窗口的标题
        pygame.display.set_caption("坦克大战1.03")
        while True:
            #使坦克移动速度慢点
            time.sleep(0.02)
            # 给窗口设置填充色
            MainGame.window.fill(BG_COLOR)
            # 获取事件
            self.getEvent()
            # 绘制文字的方法
            MainGame.window.blit(self.getTextSuface('敌方坦克剩余数量%d'%len(MainGame.enemyTankList)),(10,10))
            # 调用坦克显示的方法
            MainGame.my_tank.displayTank()
            #循环遍历敌方坦克列表,展示敌方坦克
            self.blitEnemyTank()
            #循环遍历我方坦克的子弹
            self.blitMyBullet()
            # 如果坦克的开关是开启,才可以移动
            if not MainGame.my_tank.stop:
                MainGame.my_tank.move()
            pygame.display.update()

    # 初始化敌方坦克,并将敌方坦克添加到列表中
    def createEnemyTank(self):
        top=100
        #循环生成坦克
        for i in range(MainGame.enemyTankCount):
            left=random.randint(0,400)
            speed=random.randint(1,4)
            enemy=EnemyTank(left,top,speed)
            MainGame.enemyTankList.append(enemy)

    # 循环遍历敌方坦克列表,展示敌方坦克
    def blitEnemyTank(self):
        for enemyTank in MainGame.enemyTankList:
            enemyTank.displayTank()
            enemyTank.randMove()
    #循环遍历我方子弹存储列表
    def blitMyBullet(self):
        for myBullet in MainGame.myBulletList:
            myBullet.displayBullet()




    #结束游戏
    def endGame(self):
        print("谢谢使用,欢迎再来")
        exit()
    #左上角文字的绘制
    def getTextSuface(self,text):
        #初始化字体模块
        pygame.font.init()
        #查看所有的字体名称
        #print(pygame.font.get_fonts())
        #获取字体Font对象
        font=pygame.font.SysFont('microsoftyaheimicrosoftyaheiuibold',18)
        #绘制文字信息
        textSurface=font.render(text,True,TEXT_COLOR)
        return textSurface


    #获取事件
    def getEvent(self):
        #获取所有事件
        eventList=pygame.event.get()
         #遍历事件
        for event in eventList:
            #判读按下的是关闭还是键盘
            #如果安的是退出,
            if event.type==pygame.QUIT:
                self.endGame()
                #如果是键盘的按下
            if event.type==pygame.KEYDOWN:
                    #判断按下的是上,下,左,右
                if event.key==pygame.K_LEFT:
                    #切换方向
                    MainGame.my_tank.direction='L'
                    #MainGame.my_tank.move()
                    #修改坦克的开关状态
                    MainGame.my_tank.stop=False
                    print("按下左键,坦克向左移动")
                elif event.key==pygame.K_RIGHT:
                    MainGame.my_tank.direction = 'R'
                    #MainGame.my_tank.move()
                    MainGame.my_tank.stop = False
                    print("按下右键,坦克向右移动")
                elif event.key==pygame.K_UP:
                    MainGame.my_tank.direction = 'U'
                    #MainGame.my_tank.move()
                    MainGame.my_tank.stop = False
                    print("按下上键,坦克向上动")
                elif event.key==pygame.K_DOWN:
                    MainGame.my_tank.direction = 'D'
                    MainGame.my_tank.stop = False
                    #MainGame.my_tank.move()
                    print("按下键,坦克向下动")
                elif event.key==pygame.K_SPACE:
                    print('发射子弹')
                    #创建我方坦克发射的子弹
                    myBullet=Bullet(MainGame.my_tank)
                    MainGame.myBulletList.append(myBullet)


            #松开方向键,坦克停止移动,修改坦克的开关状态
            if event.type==pygame.KEYUP:
                #判断松开的键是上下左右时坦克才停止移动
                if event.key==pygame.K_UP or event.key==pygame.K_DOWN or event.key==pygame.K_RIGHT or event.key==pygame.K_LEFT:
                    MainGame.my_tank.stop=True





class Tank ():
    # 添加距离左边left,添加上部top
    def __init__(self, left, top):
       #保存加载的图片
        self.images={
           'U': pygame.image.load('img/p1tankU.gif'),
           'D': pygame.image.load('img/p1tankD.gif'),
           'L': pygame.image.load('img/p1tankL.gif'),
           'R': pygame.image.load('img/p1tankR.gif'),
        }
        #方向
        self.direction = 'L'
        # 根据当前图片的方向获取图片
        self.image = self.images[self.direction]
        # 根据图片获取区域
        self.rect = self.image.get_rect()
        # 设置区域的left 和 top
        self.rect.left = left
        self.rect.top = top
        # 速度 决定坦克移动的快慢
        self.speed=5
        #坦克移动的开关
        self.stop=True





    # 移动
    def move(self):
        #判断坦克的方向进行移动
        if self.direction=='L':
            if self.rect.left>0:
                self.rect.left-=self.speed
        elif self.direction=='R':
            if self.rect.left+self.rect.height<SCREEN_HEIGHT:
                self.rect.left+=self.speed
        elif self.direction=='D':
            if self.rect.top+self.rect.height<SCREEN_HEIGHT:
                self.rect.top+=self.speed
        elif self.direction=='U':
            if self.rect.top>0:
                self.rect.top-=self.speed




    # 射击
    def shot(self):
        pass
    # 展示坦克的方法
    def displayTank(self):
        # 获取展示的对象
        self.image = self.images[self.direction]
        # 调用blit方法展示
        MainGame.window.blit(self.image, self.rect)

#我方坦克
class MyTank(Tank):
    def __init__(self):
        pass

class EnemyTank(Tank):
    def __init__(self,left,top,speed):
        #加载图片集
        self.images={
            'U':pygame.image.load('img/enemy1U.gif'),
            'L': pygame.image.load('img/enemy1L.gif'),
            'R': pygame.image.load('img/enemy1R.gif'),
            'D': pygame.image.load('img/enemy1D.gif')
        }
        #方向,随机生成敌方坦克的方向
        self.direction=self.randDirection()
        #根据方向获取图片
        self.image=self.images[self.direction]
        #区域
        self.rect=self.image.get_rect()
        #对left和top赋值
        self.rect.left = left
        self.rect.top = top
        #速度
        self.speed=speed
        #移动开关键
        self.flag=True
        #新增一个步数变量step
        self.step=20
    #随机生成敌方坦克的方向
    def randDirection(self):
        num=random.randint(1,4)
        if num== 1:
            return 'U'
        elif num== 2:
            return 'D'
        elif num== 3:
            return 'L'
        elif num==4:
            return 'R'
    #敌方坦克随机移动的方法
    def randMove(self):
        if self.step<=0:
        #修改方向
            self.direction=self.randDirection()
            #让步数复位
            self.step=20
        else:
            self.move()
        #让步数递减
        self.step-=1


#子弹类
class Bullet():
    def __init__(self,tank):
        #加载图片
        self.image=pygame.image.load('img/enemymissile.gif')
        #坦克的方向决定子弹的方向
        self.direction=tank.direction
        #获取区域
        self.rect=self.image.get_rect()
        #子弹的left和top与方向有关
        if self.direction=='U':
            self.rect.left=tank.left+tank.rect.width/2-self.rect.width/2
            self.rect.top=tank.top-self.rect.height
        elif self.direction=='D':
            self.rect.left=tank.left+tank.rect.width/2-self.rect.width/2
            self.rect.top=tank.top+self.rect.height
        elif self.direction == 'L':
            self.rect.left = tank.left + tank.rect.width / 2 - self.rect.width / 2
            self.rect.top = tank.rect.top+tank.rect.width/2-self.rect.width/2
        elif self.direction == 'R':
            self.rect.left = tank.left + tank.rect.width / 2 - self.rect.width / 2
            self.rect.top = tank.rect.top+tank.rect.width/2- self.rect.width / 2
        self.speed=6
    def move(self):
        pass
    #展示子弹的方法
    def displayBullet(self):
        #将图片surface加载到窗口
        MainGame.window.blit(self.image,self.rect)


class Wall():
    def __init__(self):
        pass
     #展示墙壁的方法
    def displayWall(self):
        pass
class Explode():
    def __init__(self):
        pass
    #展示爆炸效果的方法
    def displayExplode(self):
        pass
class Music():
    def __init__(self):
        pass
    #播放音乐
    def play(self):
        pass
if __name__=="__main__":
    MainGame().startGame()
    #MainGame().getTextSuface()


Python 全系列/第二阶段:Python 深入与提高/游戏开发-坦克大战 10491楼

ssm-shiro1.rar

老师我重新写了一遍shiro的认证结果认证用户名乱码找不到原因


JAVA 全系列/第九阶段:权限控制与安全认证/Shiro(旧) 10492楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/容器(旧) 10494楼

学了这次的视频,我了解了下一直不太懂的命名空间

命名空间的出现是为了解决dtd不能解决的xml的命名冲突问题,这次课的视频里,xsd文件没有定义自己的命名空间。

然后在book.xml中引入book.xsd的时候属性使用的是

xsi:noNamespaceSchemaLocation="book.xsd"

不指定命名空间,只指定用于模式校验的xsd文档的位置,这种写法,XML模式处理器已经可以校验到xml里的写法问题了。如图:具体报错:

The content of element 'book' is not complete. One of '{price}' is expected.

说明已经检验成功了

image.png

在这里老师用的是

xsi:noNamespaceSchemaLocation="{book.xsd}" 而这种写法在我的idea里面是报红的。 至于视频里老师不报红,我猜测不同工具的不同文件,可能工具没有识别出来语法错误,把验证插件给关闭了。image.png为什么老师要多此一举,使用java的相关类,SchemaFactory进行解析, 是不是因为要让我们了解如果脱离eclipse或者相关IDE,没有XML解析器,在只有xml文件及xsd文件的基础上,java也可以完成使用schema对xml文档的校验。

(扩充:自己测试了一下似乎谷歌浏览器无法完成使用schema对xml文档的校验,不报任何错误。)

这点在视频里没有提到。。这里存在疑问:(******) 


另外给大家一种使用命名空间的方式校验:targetNamespace在book.xsd中给当前命名空间起名字,名称任意:http://www.example.org/books 这个是可以更改的

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/books" 
elementFormDefault="qualified">
    <xs:element name="books">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="book" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="name" type="xs:string"></xs:element>
                            <xs:element name="author" type="xs:string"></xs:element>
                            <xs:element name="price" type="xs:double"></xs:element>
                        </xs:sequence>
                        <xs:attribute name="id" type="xs:positiveInteger"></xs:attribute>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

book.xml 使用命名空间http://www.example.org/books

<?xml version="1.0" encoding="UTF-8" ?>
<books xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.example.org/books"
        xsi:schemaLocation="http://www.example.org/books book.xsd">
    <book id="1001">
        <name>html的使用</name>
        <author>张三</author>
        <price>51.6</price>
    </book>
    <book id="1002">
        <name>css的使用</name>
        <author>李四</author>
        <price>40.6</price>
    </book>
</books>

注释掉第一个book元素的price元素

结果:具体报错:The content of element 'book' is not complete. One of '{"http://www.example.org/books":price}' is expected.

image.png

想让老师解答一下带****号的那里的疑问!谢谢!

JAVA 全系列/第二阶段:JAVA 基础深化和提高/XML 技术(旧) 10495楼
Python 全系列/第七阶段:网页编程基础/DOM模型 10499楼

老师,尝试登录的时候提供的手机号和密码都是正确存在的,总是提示下面的错误。非说是用户名或密码不正确。然后跟着后面一大串的exception.我实在是找不到原因了,项目都重新写了一遍了。救救我吧。。。



Creating a new SqlSession

SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5e1f02bc] was not registered for synchronization because synchronization is not active

JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@3d8d450] will not be managed by Spring

==>  Preparing: SELECT user_id,dept_id,user_name,user_type,sex,age,picture,background,phone,email,strong,honor,introduction,user_rank,`password`,last_login_time,last_login_ip,`status`,union_id,open_id,create_time,update_time,create_by,update_by,salt,del_flag,scheduling_flag FROM sys_user WHERE (phone = ?) 

==> Parameters: 13888001004(String)

<==    Columns: user_id, dept_id, user_name, user_type, sex, age, picture, background, phone, email, strong, honor, introduction, user_rank, password, last_login_time, last_login_ip, status, union_id, open_id, create_time, update_time, create_by, update_by, salt, del_flag, scheduling_flag

<==        Row: 5, 104, 华佗, 1, 1, 22, , 4, 13888001004, his4@163.com, 全科, 神医, <<BLOB>>, 1, 520a5b05dbec9f937f70092e088058e8, 2018-03-16 11:33:00, 127.0.0.1, 0, null, null, 2018-03-16 11:33:00, 2020-04-30 00:49:52, admin, 超级管理员, 91D53B3C4B8E40C7BA3613E41546AAE1, 0, 0

<==      Total: 1

Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5e1f02bc]

2020-08-30 04:10:56.275 ERROR 34210 --- [nio-8080-exec-1] c.b.controller.system.LoginController    : 用户名或密码不正确


redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

at redis.clients.jedis.util.Pool.getResource(Pool.java:59) ~[jedis-3.1.0.jar:na]

at redis.clients.jedis.JedisPool.getResource(JedisPool.java:234) ~[jedis-3.1.0.jar:na]

at org.crazycake.shiro.RedisManager.getJedis(RedisManager.java:35) ~[shiro-redis-3.2.3.jar:na]

at org.crazycake.shiro.WorkAloneRedisManager.set(WorkAloneRedisManager.java:71) ~[shiro-redis-3.2.3.jar:na]

at org.crazycake.shiro.RedisSessionDAO.saveSession(RedisSessionDAO.java:90) ~[shiro-redis-3.2.3.jar:na]

at org.crazycake.shiro.RedisSessionDAO.doCreate(RedisSessionDAO.java:131) ~[shiro-redis-3.2.3.jar:na]

at org.apache.shiro.session.mgt.eis.AbstractSessionDAO.create(AbstractSessionDAO.java:116) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.session.mgt.DefaultSessionManager.create(DefaultSessionManager.java:177) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.session.mgt.DefaultSessionManager.doCreateSession(DefaultSessionManager.java:158) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.createSession(AbstractValidatingSessionManager.java:136) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.session.mgt.AbstractNativeSessionManager.start(AbstractNativeSessionManager.java:99) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.SessionsSecurityManager.start(SessionsSecurityManager.java:152) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:336) [shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:312) [shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.DefaultSubjectDAO.mergePrincipals(DefaultSubjectDAO.java:204) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.DefaultSubjectDAO.saveToSession(DefaultSubjectDAO.java:166) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.DefaultSubjectDAO.save(DefaultSubjectDAO.java:147) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.DefaultSecurityManager.save(DefaultSecurityManager.java:383) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:350) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:183) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:283) ~[shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:256) [shiro-core-1.3.2.jar:1.3.2]

at com.bjsxt.controller.system.LoginController.login(LoginController.java:65) ~[classes/:na]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_211]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_211]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_211]

at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_211]

at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112) [shiro-web-1.5.3.jar:1.5.3]

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.3.2.jar:1.3.2]

at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.5.3.jar:1.5.3]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594) [tomcat-embed-core-9.0.33.jar:9.0.33]

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.33.jar:9.0.33]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_211]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_211]

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.33.jar:9.0.33]

at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211]

Caused by: redis.clients.jedis.exceptions.JedisDataException: WRONGPASS invalid username-password pair

at redis.clients.jedis.Protocol.processError(Protocol.java:132) ~[jedis-3.1.0.jar:na]

at redis.clients.jedis.Protocol.process(Protocol.java:166) ~[jedis-3.1.0.jar:na]

at redis.clients.jedis.Protocol.read(Protocol.java:220) ~[jedis-3.1.0.jar:na]

at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:318) ~[jedis-3.1.0.jar:na]

at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:236) ~[jedis-3.1.0.jar:na]

at redis.clients.jedis.BinaryJedis.auth(BinaryJedis.java:2229) ~[jedis-3.1.0.jar:na]

at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:119) ~[jedis-3.1.0.jar:na]

at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:889) ~[commons-pool2-2.7.0.jar:2.7.0]

at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:424) ~[commons-pool2-2.7.0.jar:2.7.0]

at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:349) ~[commons-pool2-2.7.0.jar:2.7.0]

at redis.clients.jedis.util.Pool.getResource(Pool.java:50) ~[jedis-3.1.0.jar:na]

... 91 common frames omitted








JAVA 全系列/第二十一阶段:分布式医疗云平台/系统管理前后端开发(旧) 10500楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637