- 博客(11)
- 收藏
- 关注
原创 SpringBoot SpringSecurity配置类
import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web....
2019-12-03 11:53:59 448
原创 Vue基础笔记
ES6 三个定义变量命令 var:在过去Js定义变量只有一个关键字:var,var有一个问题,就是定义的变量有时会莫名奇妙的成为全局变量 let:定义局部变量,只有在let命令所在的代码块内有效。 const:定义常量,不能被修改。 ES6解构表达式 定义的一个person对象: const person = { name:"jack", age:21, lan...
2019-10-25 21:11:21 182
原创 怎么注册拦截器
想要加载拦截器,就需要继承WebMvcConfigurerAdapter public class SpringMvcConfig extends WebMvcConfigurerAdapter { @Autowired private MyInterceptor1 myInterceptor1; @Override public void addInterce...
2019-10-24 20:21:17 461
原创 异常处理器
//加上该注解,交给IOC管理 @Component public class CustomExceptionResolver implements HandlerExceptionResolver { @Override public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse ...
2019-10-24 20:19:20 273
原创 Java实体类日期转换
class Person{ @DateTimeFormat(pattern = “yyyy-MM-dd”) //前台传数据到后台 @JsonFormat(pattern = “yyyy-MM-dd”,timezone="GMT+8")// 后台传数据到前台 private Date birthday; //--------------------------------get/set---...
2019-10-24 20:17:08 2215
原创 SpringMvc视图解析器配置
视图解析器配置 @Configuration //声明配置类 @ComponentScan("com.xxx.controller") //扫描包 public class MVCConfiguration { @Bean public InternalResourceViewResolver viewResolver(){ InternalResourceViewResolver view...
2019-10-24 20:12:54 386
原创 WebApplicationInitializer配置
WebApplicationInitializer配置 import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.web.WebA...
2019-10-24 20:10:46 541
原创 Spring常用注解和总结笔记
常用注解: @Component 声明交给spring管理 @Controller @Service @Repository @Configuration 声明配置类 @ComponentScan 扫描 @Resource 依赖注入 @Value(“${xxx}”) 注入简单值 @PropertySource(value = “classpath:db.properties”)加载propert...
2019-10-24 19:59:37 131
原创 清理maven下载失败的依赖
清理下载中断依赖的bat文件内容: set REPOSITORY_PATH=D:\Java\maven\maven_repository rem 正在搜索... for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do ( del /s /q %%i) rem 搜索完毕 Pause ...
2019-10-24 19:34:23 428
原创 maven仓库导入本地jar包
导入自定以jar包DOS命令: mvn install:install-file -Dfile=导入的jar包绝对路径 - DgroupId=组织名 -DartifactId=包名 -Dversion=版本 -Dpackaging=jar
2019-10-24 19:32:44 251
原创 数据库基础笔记
Maven: 清理下载中断依赖的bat文件内容: set REPOSITORY_PATH=D:\Java\maven\maven_repository rem 正在搜索... for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do ( del /s /q %%i) rem 搜索完毕 Pause 导入自定...
2019-10-24 17:40:03 1577
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人