- 博客(4)
- 收藏
- 关注
原创 MyBatis工作原理
原理:通过SqlSessionFactoryBuilder从mybatis-config.xml配置文件中构建出SqlSessionFactory。 SqlSessionFactory开启一个SqlSession,通过SqlSession实例获得Mapper对象并且运行Mapper映射的Sql语句。 完成数据库的Sql语句CRUD操作。 操作成功则提交事务,操作失败则回滚事务。 关闭SqlSession。...
2021-05-19 14:41:54
91
原创 通过获取文件名移除后缀和只获取后缀
磁盘下的某一个文件File file= new File("D:/某一个文件");//获取文件名称String fileName = file.getOriginalFilename();//移除文件以点结尾的后缀if (fileName.contains(".")) { String prefix = fileName.substring(0,fileName.lastIndexOf(".")); System.out.println(prefix);...
2021-05-19 11:07:11
1183
原创 SpringBoot整合Mybatis+Postgresql
第一步:配置文件(application.yml)server: port: 8081spring: datasource: url: jdbc:postgresql://localhost:5432/STBCSystem username: postgres password: 123 driver-class-name: org.postgresql.Drivermybatis: mapperLocations: classpath:mapper/*
2021-05-13 11:30:03
994
2
原创 简单的SSM框架上传图片
简单的SSM框架上传图片 @RequestMapping(value = "/xxx", method = RequestMethod.POST) @ResponseBody public Result insert(MultipartFile file, SXTB sxtb) { try { //获取图片名称 String fileName = file.getOriginalFilename(); ...
2021-05-11 14:16:57
183
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人