上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 58 下一页
摘要: 一: 创建bean的方法: 1: 如果不采用构造注入:默认调用bean的无参构造函数,因此该类必须要提供无参构造函数,用无参构造函数用反射创建bean。 : 如果采用构造注入:则使用 <constructor-arg>配置一个构造函数。 2:用静态工厂方法创建bean: factory-method 阅读全文
posted @ 2017-09-25 22:30 刘大飞 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1: 注释或者删除注释: Ctrl + / 2: 快速修复: 鼠标放到报错的行上,自动弹出或者Ctrl + 1 3: 删除当前行: Ctrl + D 4: 格式化文档: Ctrl + shift + f, 有的时候这个快捷键不好用,可能是和输入法的快捷键冲突。 5: 插入空行: Shift + En 阅读全文
posted @ 2017-09-24 15:48 刘大飞 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1: Web service: 是一个大的概念范畴,它表现了一种设计思想 SOAP 是 Web service 的一个重要组成部份. SOAP 是一种协议而非详细产品.SOAP 是通过 XML 文件来做为数据转输的的载体,走 HTTP 的线路. REST(表述行状态转移, 是面向资源的, Sprin 阅读全文
posted @ 2017-09-24 15:19 刘大飞 阅读(187) 评论(0) 推荐(0) 编辑
摘要: servlet作用: 它驻留在 Web 服务器上,处理新来的请求和输出的响应。它与表示无关,实际上也不它应该与表示有关。 作为一名专业编程人员,您碰到的大多数 Java servlet 都是为响应 Web 应用程序上下文中的 HTTP 请求而设计的.因此,javax.servlet和javax.se 阅读全文
posted @ 2017-09-24 14:21 刘大飞 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 1: Tomcat容器四个等级? Container, Engine, Servlet容器, Context 真正管理Servlet的容器是Context容器:一个context对应一个web工程。 <Context path="/projectOne " docBase="D:\projects\ 阅读全文
posted @ 2017-09-24 12:14 刘大飞 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 一: web.xml中常用配置元素? <servlet></servlet>: 在向servlet或JSP页面制定初始化参数或定制URL时,首先命名servlet或JSP页面。Servlet元素就是用来完成此项任务。 <servlet-mapping></servlet-mapping> // se 阅读全文
posted @ 2017-09-24 10:42 刘大飞 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1: @Valid 注解 @NotNull(message="名字不能为空") private String userName; @Max(value=120,message="年龄最大不能查过120") private int age; @Email(message="邮箱格式错误") priva 阅读全文
posted @ 2017-09-22 22:16 刘大飞 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1: servlet生命周期: Servlet加载 -> 实例化-> 服务 -> 销毁 2:Servlet重要函数: init():在Servlet的生命周期中,仅执行一次init()方法。它是在服务器装入Servlet时执行的,负责初始化Servlet对象。可以配置服务器,以在启动服务器或客户机首 阅读全文
posted @ 2017-09-19 23:32 刘大飞 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1: InitializingBean vs init-method InitializingBean 是一个接口,有一个方法afterPropertiesSet,不建议使用;因为InitializingBean是Spring接口,这样导致 bean和spring耦合到一起了。 Disposable 阅读全文
posted @ 2017-09-19 22:17 刘大飞 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1: Spring的IOC容器: IOC容器为管理对象之间的依赖关系提供了基础功能。 A:BeanFactory: B:ApplicationContext(继承自BeanFactory,功能更多): 有3个实现类: ClassPathXmlApplicationContext : classpat 阅读全文
posted @ 2017-09-18 22:32 刘大飞 阅读(190) 评论(0) 推荐(0) 编辑
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 58 下一页