当前位置: 首页 > news >正文

合肥网站优化搜索怎么销售网站

合肥网站优化搜索,怎么销售网站,企业网怎么拉,深圳市西特塔网站建设工作室目录 Javaweb三大组件及环境特点 Spring整合web环境的思路及实现 Spring的web开发组件spring-web MVC框架思想及其设计思路 Javaweb三大组件及环境特点 Spring整合web环境的思路及实现 package com.xfy.listener;import com.xfy.config.SpringConfig; import org.springfra…目录 Javaweb三大组件及环境特点 Spring整合web环境的思路及实现 Spring的web开发组件spring-web MVC框架思想及其设计思路 Javaweb三大组件及环境特点 Spring整合web环境的思路及实现 package com.xfy.listener;import com.xfy.config.SpringConfig; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener;public class ContextLoaderListenter implements ServletContextListener {private String CONTEXT_CONFIG_LOCATIONContextConfigLocation;Overridepublic void contextInitialized(ServletContextEvent servletContextEvent) {ServletContext servletContext servletContextEvent.getServletContext();String initParameter servletContext.getInitParameter(CONTEXT_CONFIG_LOCATION); // initParameterinitParameter.substring(classpath.length());//1.创建Spring容器ApplicationContext applicationContextnew ClassPathXmlApplicationContext(initParameter);//2.将容器存入ServletContext中servletContext.setAttribute(applicationContext,applicationContext);}Overridepublic void contextDestroyed(ServletContextEvent servletContextEvent) {} }public class WebAppLicationContext {public static ApplicationContext getWebAppLicationContext(ServletContext servletContext){ApplicationContext applicationContext (ApplicationContext) servletContext.getAttribute(applicationContext);return applicationContext;} }WebServlet(urlPatterns /accountServlet) public class AccountServlet extends HttpServlet {Overrideprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {ApplicationContext applicationContext WebAppLicationContext.getWebAppLicationContext(request.getServletContext());AcountService bean applicationContext.getBean(AcountService.class);bean.transforMoney(tom,lucy,500);} Spring的web开发组件spring-web Spring其实已经为我们定义好了一个ContextLoaderListener使用方式跟我们上面自己定义的大体一样 先导入Spring-web的坐标 dependencygroupIdorg.springframework/groupIdartifactIdspring-web/artifactIdversion5.2.5.RELEASE/version/dependencylistenerlistener-classorg.springframework.web.context.ContextLoaderListener/listener-class/listener ?xml version1.0 encodingUTF-8? web-app !-- 定义全局参数 --context-paramparam-namecontextClass/param-nameparam-valuecom.xfy.config.MyxfyApplicationContext/param-value/context-paramlistenerlistener-classorg.springframework.web.context.ContextLoaderListener/listener-class/listener /web-app MVC框架思想及其设计思路
http://www.w-s-a.com/news/954555/

相关文章:

  • 网站优化关键词排名自己怎么做wordpress安装主题失败
  • 成都建设银行招聘网站网站的切换语言都是怎么做的
  • 网站网业设计wordpress 很差
  • 网站开发软件著作权归谁网站悬浮窗广告
  • 如何提升网站alexa排名货运网站源码
  • 如何看自己网站流量梧州网站设计理念
  • 商城网站建设特点有哪些信息门户
  • 弄一个网站临沂有哪几家做网站的
  • 广州个人网站制作公司网站建设公司价
  • 免费建设网站赚钱小程序开发文档pdf
  • ucenter 整合两个数据库网站网店推广技巧
  • 网站优化排名提升百度wap
  • 八里河风景区网站建设内容摘要网站开发基础学习
  • 上海做外贸网站的公司智慧团建网站登陆平台
  • 上海商务网站建设如何做的网站手机可以用吗
  • 产品推广营销方案seo推广员招聘
  • 做水利网站需要多少钱山东市网站建设
  • 做网站找哪里如何修改wordpress颜色
  • 招商加盟网站系统站长工具 seo查询
  • 工商局网站清算组备案怎么做电商培训机构
  • 做好门户网站建设做本地团购网站怎么样
  • wordpress主题和预览不同20条优化防疫措施方案
  • 艾奇视觉网站建设网站推广需要几个人做
  • 2008 iis 添加网站wordpress固定链接标签加上页面
  • 宁波企业网站制作推荐网站优化人员
  • 大型资讯门户网站怎么做排名沈阳建设工程有限公司
  • 开发中英文切换网站如何做江苏网站建设费用
  • 网站论文首页布局技巧桥东网站建设
  • 网站开发项目经理工资北京微信网站
  • 山西山西省建设厅网站微信备份如何转换为wordpress