SpringBoot整合Servlet开发
SpringBoot整合Servelt1.1通过注解扫描完成servlet组件的注册编写servlet1234567@WebServlet(name="FirstServlet",urlPatterns="/first")public class FirstServlet extends HttpServlet {@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.out.println("FirstServlet............"); }}
编写启动类1234567@SpringBootApplication@ServletComponentScan //在springBoot启动时会扫描@WebServlet,并将该类实例化public class App { p ...
SpringBoot整合Filter
SpringBoot整合Filter12345PrintWriter out = resp.getWriter(); String username = req.getParameter("username"); UserService userService = new UserServiceImpl(); User user = userService.getUser(username); String str = JSON.toJSONString(user);
out.write(str);
SpringBoot整合Listener
SpringBoot整合Listener
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment