我的JAVA学习笔记(记下一些容易忘记的知识点)持续更新

1.spring单元测试用到的方法

//创建Spring容器对象

ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

 //查找到它创建的Bean

HelloSpring hs = (HelloSpring)ac.getBean("helloSpring");

 

2.Struts2 result的url传多个值

<result name="success" >test.jsp?id=100&amp;msg=${msg}</result>

 

3.jdbc连接oracle数据库

Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","admin");

4.&lt和&gt可以在网页内替换<和>标签 ,以避免javascript效果

曾经,彻夜不眠,敲代码,写程序,为了什么?兴趣爱好?头脑发热?为梦想而战?

 

 

 

 

 

发布了28 篇原创文章 · 获赞 11 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/zcjwsrf/article/details/8134240