2018最新麦子学院Laravel框架实战开发微信商城视共30课(包含源码)

2018最新麦子学院Laravel框架实战开发微信商城视共30课(包含源码),第1张

概述本文章向大家介绍2018最新麦子学院Laravel框架实战开发微信商城视共30课(包含源码),主要包括2018最新麦子学院Laravel框架实战开发微信商城视共30课(包含源码)使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

package cn.bl;



import org.springframework.boot.SpringApplication;


import org.springframework.boot.autoconfigure.SpringBootApplication;


import org.springframework.boot.web.servlet.ServletComponentScan;



@SpringBootApplication


@ServletComponentScan


public class App {


    public static voID main(String[] args) {


        SpringApplication.run(App.class,args);


    }


}


package cn.bl.Listener;



import javax.servlet.ServletContextEvent;


import javax.servlet.servletcontextlistener;


import javax.servlet.annotation.WebListener;



@WebListener


public class FirstListener implements servletcontextlistener{


    @OverrIDe


    public voID contextinitialized(ServletContextEvent sce) {


        System.out.println("init .. ");


    }


    @OverrIDe


    public voID contextDestroyed(ServletContextEvent sce) {


        System.out.println("desroyed .. ");


    }


}


package cn.bl.Listener;



import javax.servlet.ServletContextEvent;


import javax.servlet.servletcontextlistener;



public class SecondListener implements servletcontextlistener{


    @OverrIDe


    public voID contextinitialized(ServletContextEvent sce) {


        System.out.println("second servletListener init .. ");


    }


    @OverrIDe


    public voID contextDestroyed(ServletContextEvent sce) {


        System.out.println("second servletListener destroy .. ");


    }


}


package cn.bl;



import org.springframework.boot.SpringApplication;


import org.springframework.boot.autoconfigure.SpringBootApplication;


import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;


import org.springframework.context.annotation.Bean;



import cn.bl.Listener.SecondListener;



@SpringBootApplication


public class App2 {


    public static voID main(String[] args) {


        SpringApplication.run(App2.class,args);


    }


    @Bean


    public ServletListenerRegistrationBeangetBean(){


        ServletListenerRegistrationBeanbean = new ServletListenerRegistrationBean<>(new SecondListener());


        return bean;


    }


}


总结

以上是内存溢出为你收集整理的2018最新麦子学院Laravel框架实战开发微信商城视共30课(包含源码)全部内容,希望文章能够帮你解决2018最新麦子学院Laravel框架实战开发微信商城视共30课(包含源码)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1268833.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存