IT修真院·坑乎 | Java(后端),CSS(前端),JavaScript(前端),PM(产品经理),UI(交互设计),QA(测试),Android(安卓APP),iOS(苹果APP),OP(运维),Python(后端)日常在线问答学习平台
咨询电话 : 010-59478634
切换导航
首页
我的提问
我的回答
我的点赞
消息通知
个人主页
×
提示
尚未登陆,前往官网登陆?
×
提示
尚未登陆,前往官网登陆?
CSS
JS
Android
IOS
JAVA
OP
PM
UI
QA
求职辅导
Python
运营
动画师
AIGC
CSS
JS
Android
IOS
JAVA
OP
PM
UI
QA
求职辅导
Python
运营
动画师
AIGC
所有任务
任务1
任务2
任务3
任务4
任务5
任务6
任务7
任务8
任务9
任务10
任务11
全部
问题
已收录
问题
未收录
问题
没有找到答案,去提问>>>
Nginx的动静分离具体实现是怎么体现的
0
1
Nginx
class="cursor-pointer"> 详细描述
百科上说Nginx的优点是稳定性、丰富的功能集、示例配置文件和低系统资源的消耗。并没有发现体现在哪里。动静分离的实现。
class="cursor-pointer"> 错误截图
通过这个对比还是没看出来怎么实现动静分离的
Mybatis的if标签判空会把0判成空
0
1
class="cursor-pointer"> 详细描述
确定参数能够传入Mybatis,但是会把0识别成空导致这条拼接失效,
class="cursor-pointer"> 错误截图
可以看到传入的这个对象是有两个参数 messageReplyWorkId=1, messageReplyId=0 但是动态sql拼接之后只有 Preparing: SELECT * FROM message WHERE message_reply_work_id=? ORDER BY message_create_at DESC
class="cursor-pointer"> 源码
SELECT * FROM message
message_id=#{messageId}
AND message_status=#{messageStatus}
AND message_reply_work_id=#{messageReplyWorkId}
AND message_reply_id=#{messageReplyId}
ORDER BY message_create_at DESC
mapper
public CodeMessageData selectMessage(Work workReceive, Message messageReceive, Integer pn, Integer num) { PageHelper.startPage(pn, num); Work work = new Work(); work.setWorkName(workReceive.getWorkName()); List
workList = workMapper.selectWork(work); if(null==workList||workList.size()==0){ return new CodeMessageData(0,"未找到该作品"); }else{ Message message = new Message(); message.setMessageReplyWorkId(workList.get(0).getWorkId()); message.setMessageReplyId(0L); message.setMessageStatus(messageReceive.getMessageStatus()); List
messageList = messageMapper.selectMessage(message); if (null == messageList || messageList.size() == 0) { return new CodeMessageData(0, "未找到该作品留言"); } else { return new CodeMessageData(1, "查询成功", new PageInfo
(messageList)); } } }
service
@RequestMapping(value = "/SelectMessage", method = RequestMethod.POST) public CodeMessageData selectMessage(Work workReceive, Message messageReceive, Integer pn, Integer num) { if(null!=messageReceive.getMessageStatus()&&(messageReceive.getMessageStatus()!=0&&messageReceive.getMessageStatus()!=1)){ return new CodeMessageData(0,"留言状态错误"); }else if(null==workReceive.getWorkName()||workReceive.getWorkName()==""){ return new CodeMessageData(0,"留言所属作品名错误"); }else if (null==pn||pn<=0||null==num||num<=0) { return new CodeMessageData(0, "页码错误"); }else{ return messageService.selectMessage(workReceive,messageReceive,pn,num); } }
controller
validator参数检验
0
1
校验框架
class="cursor-pointer"> 详细描述
使用spring validator做参数检验,验证数字大小时,数值只能从1到999999999的范围,如果超过这个范围的话是不是必须得自定义参见检验的类?
为什么要自测,仅仅使用Postman来测试足够吗?
0
1
class="cursor-pointer"> 详细描述
代码为什么要自测,什么是自测? 仅仅使用Postman来测试足够吗?什么是本地测试,什么是在开发环境测试?在开发过程中,应该每天部署代码到开发环境吗,为什么
关于如何实现垂纶小室中的功能
0
1
class="cursor-pointer"> 详细描述
垂纶小室中的作品分为一级,二级和三级,三级为作品集,我是通过建了三张表,来保存。但是师兄说这种方法不好,使用起来可能不高效。让我寻找另一种方法,我查到可以设置parent_id来显示层级关系,这个很重要,如何设计我脑海里已经有了数,但是还有一种通过编码的方式实现层级关系,这个我没搞懂,希望哪个师兄给我解答一下。
shiro配置过程中,一直报错
0
1
class="cursor-pointer"> 详细描述
Error creating bean with name 'shiroFilter' defined in class path resource [spring/spring-mybatis.xml]
class="cursor-pointer"> 错误截图
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring/spring-mybatis.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/spring-mybatis.xml]: Cannot resolve reference to bean 'myRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1537) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:237) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:703) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) 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.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1740) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/spring-mybatis.xml]: Cannot resolve reference to bean 'myRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1537) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) ... 60 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1272) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) ... 70 more Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1493) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:518) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) ... 78 more
事务的使用
0
1
知识扩展
class="cursor-pointer"> 详细描述
目前对于事务就是简单的将多个方法保持一致性,没有再深入的使用,对于复盘的程度来讲,关于事务还有哪些需要学习的地方。
Let's Encrypt 配置ssl证书
0
1
知识扩展
class="cursor-pointer"> 详细描述
使用Let's Encrypt 配置ssl证书,但是在失败时,只是删除了其生成的ssl证书所在文件,但是nginx的配置中,有被修改的地方,找了很久,发现是用户组的group文件被删除了,添加后,nginx就能关闭、启动了,这里就不明白,为什么会删掉了group文件。。
cookie设置有效票时间多少合适?以及如何顺延时间
0
1
md5/des
class="cursor-pointer"> 详细描述
我在代码中把cookie时间设置为了七天,也就是登陆的时候产生的那个cookie有效时间是七天,如果用户推出界面,隔一天再使用的话,怎样才能让cookie有效时间刷新,也就是顺延七天
nginx配置好绝对路径无法访问静态资源
1
1
class="cursor-pointer"> 详细描述
nginx配置好了server,可以访问接口 配置好了location,可以访问主页和接口 但是静态资源部分的配置怎么配置都无法访问
class="cursor-pointer"> 错误截图
首页
<
122
123
124
125
126
127
128
129
130
131
132
>
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
5
10