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
全部
问题
已收录
问题
未收录
问题
没有找到答案,去提问>>>
任务过程中 遇到下面两个bug
0
1
md5/des
class="cursor-pointer"> 详细描述
Cause: java.sql.SQLException: Field 'id' doesn't have a default value Artifact Project3:war exploded: Error during artifact deployment. See server log for details.
java为什么没有尾递归优化,如果想自己实现尾递归优化,应该从哪入手
0
1
class="cursor-pointer"> 详细描述
java为什么没有尾递归优化,如果想使用尾递归优化递归算法,如果原生没有尾递归优化,我们从哪里手动更改算法结构达到优化递归算法的目的。如果原生没有尾递归优化,我们从哪里手动更改算法结构达到优化递归算法的目的。
关于restful 风格实现增删改查
0
1
class="cursor-pointer"> 详细描述
post和 get 请求好弄,就是配置隐藏请求方法的过滤器时 用put和delete 请求 报错,这个比较头疼,还有一些基本的页面,我也不会做
在服务器启动jetty后无法启动
0
1
jetty/tomcat
class="cursor-pointer"> 详细描述
今天在Linux服务器上安装完Jetty后,启动不了服务,显示地址被占用,但是我修改了端口还是不能够启动,请问有师兄遇到这样的情况吗 错误信息如下: 2019-04-26 22:37:43.929:INFO::main: Logging initialized @634ms 2019-04-26 22:37:44.001:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html 2019-04-26 22:37:44.198:INFO:oejs.Server:main: jetty-9.3.27.v20190418, build timestamp: 2019-04-19T02:11:38+08:00, git hash: d3e249f86955d04bc646bb620905b7c1bc596a8d 2019-04-26 22:37:44.226:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///home/jetty/jetty-distribution-9.3.27.v20190418/webapps/] at interval 1 java.lang.reflect.InvocationTargetException 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.eclipse.jetty.start.Main.invokeMain(Main.java:215) at org.eclipse.jetty.start.Main.start(Main.java:456) at org.eclipse.jetty.start.Main.main(Main.java:76) Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:351) at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:319) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.server.Server.doStart(Server.java:406) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1540) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1462) ... 7 more Usage: java -jar start.jar [options] [properties] [configs] java -jar start.jar --help # for more information
后台已读未读消息数量统计
0
1
复盘踩坑
class="cursor-pointer"> 详细描述
系统消息推送与用户是1对多的关系,消息反馈是1对1的关系。 怎么样统计用户的未读消息数量和已读/未读状态,数据库建表和计算才是相对较优的?
JDBC与Mysql连接操作成功但是表格未更新
0
1
JDBC
class="cursor-pointer"> 详细描述
public class StudentDAOImpl implements StudentDao { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; @Override public void addStudent(Student stu) { String sql = "INSERT INTO stu (id,create_at,update_at,name,qq,job,start_time,college,number,daily_url,wish,brother,referee,city,review) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; // String sql = "INSERT INTO stu (create_at,update_at,name,qq,job,start_time,college,number,daily_url,wish,brother,referee,city,review) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; try { conn = DBUtil.getConnecttion(); System.out.println(conn+"************************"); pstmt = conn.prepareStatement(sql); pstmt.setLong(1, stu.getId()); pstmt.setLong(2, stu.getCreate_at()); pstmt.setLong(3, stu.getUpdate_at()); pstmt.setString(4, stu.getName()); pstmt.setInt(5, stu.getQq()); pstmt.setString(6, stu.getJob()); pstmt.setLong(7, stu.getStart_time()); pstmt.setString(8, stu.getCollege()); pstmt.setInt(9, stu.getNumber()); pstmt.setString(10, stu.getDaily_url()); pstmt.setString(11, stu.getWish()); pstmt.setString(12, stu.getBrother()); pstmt.setString(13, stu.getReferee()); pstmt.setString(14, stu.getCity()); pstmt.setString(15, stu.getReview()); System.out.println("添加学生成功"); } catch (SQLException e) { e.printStackTrace(); } finally { DBUtil.closeAll(rs, pstmt, conn); } } public class Test { public static void main(String[] args) { //添加 StudentDao sd=new StudentDAOImpl(); sd.addStudent(new Student(11l,1l,2l,"曹非凡",123,"爪哇",3l,"牧专",123,"com", "money","王汇通","zhihu","zhengz","通过"));
class="cursor-pointer"> 错误截图
阿里云中迁移数据板块,无法加载腾讯云的bucket
0
1
第三方API调用
class="cursor-pointer"> 详细描述
密钥那些都没有问题,正在工单上交流。一直回复bucket错误
class="cursor-pointer"> 错误截图
正常的那几个配置啊
Https是什么?怎么配置Https证书,Https究竟如何保证传输安全
0
1
class="cursor-pointer"> 详细描述
Https是什么?怎么配置Https证书,Https究竟如何保证传输安全
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
@RequestPara和@PathVariable有什么区别?
0
1
SSM
class="cursor-pointer"> 详细描述
@RequestPara和@PathVariable都可以用来传递参数,二者在使用时有什么区别?对于应用场景有什么要求?
首页
<
52
53
54
55
56
57
58
59
>
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
5
0
10