springboot配置servlet
作者:
CXY_XZL | 来源:发表于
2020-11-18 21:25 被阅读0次
1.代码
@Slf4j
@WebServlet("/my")
public class MyServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
log.info("doGet...");
super.doGet(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
log.info("doPost...");
super.doPost(req, resp);
}
}
@ServletComponentScan
@SpringBootApplication
public class SpireApplication {
public static void main(String[] args) {
SpringApplication.run(SpireApplication.class, args);
}
}
2.相关
本文标题:springboot配置servlet
本文链接:https://www.haomeiwen.com/subject/qcdhiktx.html
网友评论