servlet 与 springboot
发表于:2025-02-07 作者:千家信息网编辑
千家信息网最后更新 2025年02月07日,@WebServlet(name = "httpServletDemo", urlPatterns = "/httpServletDemo", initParams = {
千家信息网最后更新 2025年02月07日servlet 与 springboot
@WebServlet(name = "httpServletDemo", urlPatterns = "/httpServletDemo", initParams = { @WebInitParam(name = "name", value = "username"), @WebInitParam(name = "mobile", value = "1232423434")})@Controllerpublic class HttpServletDemo extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String name = getInitParameter("name"); String mobile = getInitParameter("mobile"); System.out.println("name:"+name+"; mobile:"+mobile); resp.getWriter().print("this is a demo"); resp.setStatus(200); } @Override protected long getLastModified(HttpServletRequest req) { return super.getLastModified(req); } @Override protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doHead(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doPost(req, resp); } @Override protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doPut(req, resp); } @Override protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doDelete(req, resp); } @Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doOptions(req, resp); } @Override protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doTrace(req, resp); } @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.service(req, resp); } @Override public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { String name = getInitParameter("name"); String mobile = getInitParameter("mobile"); System.out.println("name:"+name+"; mobile:"+mobile); super.service(req, res); }}
spring boot 启动类
@SpringBootApplication@EnableEurekaClient@ServletComponentScan(basePackages = {"com.example.demo.filter","com.example.demo.interceptor","com.example.demo.servlet"})public class SpringWebDemoApplication { public static void main(String[] args) { SpringApplication.run(SpringWebDemoApplication.class, args); }}
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
福建网络技术开发口碑推荐
软件开发平台名字
文件服务器的必要性
茂名服务器
法制网络安全教育主题
服务器主板通讯异常是什么原因
网络技术应用重点知识
系统如何把数据保存到数据库中
审计署 网络安全应急预案
描述数据库的视图和储存过程
网络安全的护航人
网络安全管理装置
日照布网络安全平台
网络安全与攻防技术重点知识
网络安全的特性选择题
手游服务器开发教程
网络安全我有话说周记
浙江数据软件开发检测中心
广东web前端软件开发哪家正规
网络安全设备应如何部署
网络安全周知识竞赛题库选择题
电信硬防服务器租用
鸠鸠互联网科技合法吗
简单的数据库怎么创建
网络安全职业体系
卖服务器赚钱知乎
计算机网络技术大纲总结
万方数据库按月收费
互联网科技公司市值排名
计算机网络技术主要学几年