01 2019 档案
摘要:1.启动类上添加注解 @EnableScheduling //启用定时器功能 2.定时器任务类
阅读全文
摘要:1.启动类上添加注解 @ServletComponentScan @SpringBootApplication() @ComponentScan(basePackages={"com"}) @ServletComponentScan //scans from the package of the a
阅读全文
摘要:1.添加配置文件 @Bean public FilterRegistrationBean nextFilterRegistrationBean(){ //加载自定义过滤器 FilterRegistrationBean registrationBean = new FilterRegistration
阅读全文
摘要:1.Thymeleaf简介 Thymeleaf是一个现代服务器端Java模板引擎,适用于Web和独立环境,能够处理HTML,XML,JavaScript,CSS甚至纯文本。 Thymeleaf的主要目标是提供一种优雅且高度可维护的模板创建方式。为实现这一目标,它以自然模板的概念为基础,将其逻辑注入模
阅读全文
摘要:1.新建banner.txt文件保存在resources文件夹下。 收纳几个自己常用的banner.txt
阅读全文
摘要:1. 添加jar包依赖 2. 配置文件放config文件夹下 3.接口添加注释 4. 访问网址:localhost:8080/swagger-ui.html 5.注解 swagger通过注解表明该接口会生成文档,包括接口名、请求方法、参数、返回信息的等等。 关于参数的详细解释(paramType取不
阅读全文
摘要:作用:不重启服务器编译/部署项目 1. 添加依赖 2. 修改pom.xml配置 (添加configuration ) 3. 重启服务 4. 便捷取消热部署 在main方法中添加
阅读全文