表单是post请求,requesMapping默认是get请求怎么会接受到数据
老师我这咋不对
这个sleep()是不执行了吗?
老师可以解释一下这个输出的结果吗 为啥是这样 没想明白
a.get() ?是吧
老师可以修改一下这个代码吗?
老师,我这个为什么没有请求体呢。from Data
想问下idea运行tomcat的时候,重启有update resources, update classes and resources, redeploy, restart server,这些有什么区别呢
为啥我的每次运行结果都一模一样???
public class haunchongThread { public static void main(String[] args) { Zaocarcahng zaocar = new Zaocarcahng(); Thread scz = new Thread(new scz(zaocar)); Thread xfz = new Thread(new xfz(zaocar)); scz.start(); xfz.start(); } } //缓冲区 class Zaocarcahng { ArrayList c = new ArrayList<>(10); //存车 synchronized public void scc(Ccar ccar, String s){ while (c.size()>=10){//如果到10了就满了,休息 try { this.wait();//线程休息 } catch (InterruptedException e) { throw new RuntimeException(e); } }//到这里线程还在休息,无法执行下面的唤醒,所以没有冲突 this.notify();//唤醒 c.add(ccar); System.out.println(s+"生产了"+ccar.toString()); } //取车 synchronized public Ccar xsc(int ccarid){ if (c.size()<=0){//车不够了,等着休息 try { this.wait();//线程休息 } catch (InterruptedException e) { throw new RuntimeException(e); } }//到这里线程还在休息,无法执行下面的唤醒,所以没有冲突 this.notify();//唤醒 return (Ccar) c.remove(ccarid); } } //产物 class Ccar { private int id ; public Ccar() { } public Ccar(int id) { this.id = id; } @Override public String toString() { return "Ccar{" + "id=" + id + '}'; } public int getId() { return id; } public void setId(int id) { this.id = id; } } //生产者 class scz implements Runnable{ Zaocarcahng zcc; public scz(Zaocarcahng zcc) { this.zcc = zcc; } @Override public void run() { //生产 for (int i = 0; i < 20; i++) { zcc.scc(new Ccar(i),"生产者----"); } } } //消费者 class xfz implements Runnable{ Zaocarcahng zcc; public xfz(Zaocarcahng zcc) { this.zcc = zcc; } @Override public void run() { for (int i = 0; i < 20; i++) { Ccar xsc = zcc.xsc(0);//只取第1个 System.out.println("消费:"+xsc.toString()); } } }
老师请看一下我的代码有什么问题,注释掉这些事务相关的部分就能运行,否则出现Failed to load ApplicationContext报错
Spring_Transfer.rar
public class JdbcTest2 { public static void main(String[] args) throws IOException, ClassNotFoundException, SQLException { //实例化properties对象 Properties prop = new Properties(); //获取properties字节文件输入流 InputStream is = JdbcTest2.class.getClassLoader().getResourceAsStream("jdbc.properties"); //读取properties文件并解析 prop.load(is); String url = prop.getProperty("url"); String name = prop.getProperty("name"); String pwd = prop.getProperty("pwd"); String driver = prop.getProperty("driver"); System.out.println(url+name+pwd+driver); //加载驱动 Class.forName(driver); //通过驱动管理器获取连接对象 Connection connection = DriverManager.getConnection(url,name,pwd); System.out.println(connection); } }
老师,报空指针异常是怎么回事
10分15秒 保存退出怎么操作?
为什么这里排序是写:
b=a.sort()
输出结果为:None
老师我发现这个每执行一次所花费的时间都不一样哎 是正常的吧
3.7 版本影响正常学习吗? 备注 电脑 win7
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637