
springboot1
zhang1996922
这个作者很懒,什么都没留下…
展开
-
springboot整合listener
public class FirstListen implements ServletContextListener{ @Override public void contextDestroyed(ServletContextEvent sce) { } @Override public void contextInitialized(ServletContextEvent sce) { }}@SpringBootApplicationpublic class Demo原创 2020-10-17 21:10:47 · 143 阅读 · 0 评论 -
springboot整合servlet
public class FirstServlet extends HttpServlet{ @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.out.println("successful"); }}//通过方法引用servlet@SpringBootApplicationpubl原创 2020-10-17 19:50:32 · 137 阅读 · 0 评论 -
springboot的pom.xml文件
//spring的<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.3.RELEASE</version></parent> //JDK版本 <properties> <java.vers原创 2020-10-17 19:46:43 · 190 阅读 · 0 评论