老师在定义成员变量List<Menus> menus时直接new ArrayList<>()的作用是什么?在使用setMenus方法时传的必须是ArrayList类型的?
import java.util.Scanner; public class salaryCalculator { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("**********我的薪水计算器********"); System.out.println("1、输入88.退出程序。 \n2、输入66,计算下一个年薪"); while(true){ System.out.println("请输入你的月薪"); int monthSalary = s.nextInt(); System.out.println("每年是几个月的薪水"); int months = s.nextInt(); int yearSalary = monthSalary*months; System.out.println("你的年薪是"+yearSalary); if (yearSalary>200000){ System.out.println("恭喜你超越98%的人,大佬"); } else if (yearSalary>100000){ System.out.println("恭喜你超越90%的人"); } } System.out.println("输入88,退出系统;输入66,进行下一个用户"); int comm = s.nextInt(); if (comm == 88){ System.out.println("退出系统!"); break; } if (comm == 66){ System.out.println("继续计算下一个用户"); continue; } } }
同样代码,我出了这个问题
老师我的这个配置了jdk 我在配置mongodb 怎么配置啊 我这样配置 报错了
这老师讲的真好,不管是逻辑思维还是其他的 都太吸引人了~
老师圈中的部分是啥意思?之前的课没有说过呀
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.bjsxt.service.UserService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.bjsxt.service.UserService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
javax.servlet.ServletException: Servlet[springmvc]的Servlet.init()引发异常
查阅很多没发现错误原因在那里
ssmdemo.zip
老师我发现我这个它不能每次保存在image目录下,第一次可以,然后我把保存的图片删除后就需要去改一下output,得加个斜杠,然后再次启动才能把图片保存在image目录中,否则重新启动就没有,这是为啥?
一个终端只能认证一个用户吗???
当我们给数据库添加用户的时,任意库执行命令都行,还是说需要到指定的库下执行db.createUser()?
provider启动没问题,不过consumer在install的时候,出现了这个问题
springbootDubbo.zip
老师这里是因为什么啊
package com.bzcxy.jdbc; import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; import java.util.Scanner; public class Statement_test { public static void main(String[] args) throws IOException, ClassNotFoundException, SQLException { InputStream is=jdbc_test5.class.getClassLoader().getResourceAsStream("jdbc.properties"); Properties properties=new Properties(); properties.load(is); String user=properties.getProperty("user"); String password=properties.getProperty("password"); String url=properties.getProperty("url"); String driverClass=properties.getProperty("driverClass"); Class.forName(driverClass);//加载驱动 Connection coon= DriverManager.getConnection(url,user,password); Statement statement=coon.createStatement();//创建对象statement,为了执行sql语句 Scanner sc=new Scanner(System.in); System.out.println("输入账号"); String username=sc.next(); System.out.println("输入密码"); String userpassword=sc.next(); String sql="insert into user(username,userpassword) values('"+username+"‘,’"+userpassword+"')";//拼写完sql语句 statement.execute(sql); coon.close(); statement.close(); } [object Object]
这个列不匹配是啥意思呀..........................
为啥这一节提交方式变为了post,上一节也是提交数据,但是为get?
老师为啥您的pdf我都找不到在哪
老师,我想问下 json对象和转换 之前学过吗?我好像没什么印象
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637