合集-Java中使用到的模板

摘要:2023-09-10 maven中配置多环境的写法 <!-- 多环境配置--> <profiles> <!-- 开发环境--> <profile> <id>env_dep</id> <properties> <jdbc.url>jdbc:mysql://127.0.0.1:3306/db01?use 阅读全文
posted @ 2023-09-10 12:04 努力是一种常态 阅读(61) 评论(0) 推荐(0) 编辑
摘要:2023-09-10 spring: profiles: active: dev spring: profiles: dev server: port: 8080 spring: profiles: pro server: port: 8081 spring: profiles: test serv 阅读全文
posted @ 2023-09-10 15:25 努力是一种常态 阅读(156) 评论(2) 推荐(0) 编辑
摘要:2023-09-10 spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:33 阅读全文
posted @ 2023-09-10 17:26 努力是一种常态 阅读(249) 评论(0) 推荐(0) 编辑
摘要:2023-09-10 mybatis-plus中添加的依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.4.0</version> 阅读全文
posted @ 2023-09-10 18:19 努力是一种常态 阅读(149) 评论(0) 推荐(0) 编辑
摘要:2023-09-10 目录结构 logback.xml <?xml version="1.0" encoding="UTF-8"?> <configuration> </configuration> application.yml spring: datasource: driver-class-n 阅读全文
posted @ 2023-09-10 18:46 努力是一种常态 阅读(325) 评论(0) 推荐(0) 编辑
摘要:2023-09-10 @Data @TableName("tbl_phone") public class Phone { @TableField(select = false) private Integer id; private String type; private String name 阅读全文
posted @ 2023-09-10 21:14 努力是一种常态 阅读(236) 评论(0) 推荐(0) 编辑
摘要:2023-09-10 version字段表示乐观锁 在表结构中添加一个字段表示乐观锁 package com.hh.domain; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatispl 阅读全文
posted @ 2023-09-10 22:04 努力是一种常态 阅读(39) 评论(0) 推荐(0) 编辑
摘要:2023-09-11 <!--代码生成器--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-generator</artifactId> <version>3.3.1</version> </depend 阅读全文
posted @ 2023-09-11 09:08 努力是一种常态 阅读(89) 评论(0) 推荐(0) 编辑
摘要:2023-09-11 1、模糊查询 UserMapper List<User> getUserByLike(String mohu); UserMapper.xml <select id="getUserByLike" resultType="com.hh.pojo.User"> select * 阅读全文
posted @ 2023-09-11 19:35 努力是一种常态 阅读(73) 评论(0) 推荐(0) 编辑
摘要:2023-09-11 UserMapper void insertUser(User user); UserMapper.xml <insert id="insertUser" useGeneratedKeys="true" keyProperty="id"> insert into t_user 阅读全文
posted @ 2023-09-11 21:03 努力是一种常态 阅读(12) 评论(0) 推荐(0) 编辑
摘要:2023-09-12 仓库 StoreHouseMapper /** * 分步查询 * 首先通过仓库的id查询出仓库 */ StoreHouse getSHAndGoodsByStepOne(@Param("id")Integer id); StoreHouseMapper.xml <resultM 阅读全文
posted @ 2023-09-12 08:52 努力是一种常态 阅读(41) 评论(0) 推荐(0) 编辑
摘要:2023-09-12 StoreHouseMapper package com.hh.mapper; import com.hh.pojo.StoreHouse; import java.util.List; /** * @author hh * @version 1.0 * @DATE 2023- 阅读全文
posted @ 2023-09-12 14:31 努力是一种常态 阅读(20) 评论(0) 推荐(0) 编辑
摘要:2023-09-12 StoreHouseMapper /** * 批量添加 */ void insertMoreSH(@Param("storeHouses") List<StoreHouse> storeHouses); /** * 批量删除方式一 */ void deleteMoreSH(@P 阅读全文
posted @ 2023-09-12 15:13 努力是一种常态 阅读(66) 评论(0) 推荐(0) 编辑
摘要:2023-09-12 导入的依赖 <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>5.3.2</version> </dependency> myba 阅读全文
posted @ 2023-09-12 17:05 努力是一种常态 阅读(39) 评论(0) 推荐(0) 编辑
摘要:2023-09-14 spring-jdbc.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3. 阅读全文
posted @ 2023-09-14 15:23 努力是一种常态 阅读(108) 评论(0) 推荐(0) 编辑
摘要:2023-09-14 web.xml <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web- 阅读全文
posted @ 2023-09-14 18:40 努力是一种常态 阅读(145) 评论(0) 推荐(0) 编辑
摘要:2023-09-14 web.xml <!--设置编码格式,解决字符乱码--> <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.Chara 阅读全文
posted @ 2023-09-14 21:22 努力是一种常态 阅读(39) 评论(0) 推荐(0) 编辑
摘要:2023-09-15 web.xml <!--请求方式过滤器--> <filter> <filter-name>HiddenHttpMethodFilter</filter-name> <filter-class>org.springframework.web.filter.HiddenHttpMe 阅读全文
posted @ 2023-09-15 10:04 努力是一种常态 阅读(45) 评论(0) 推荐(0) 编辑
摘要:2023-09-15 <!--设置默认的servlet处理静态资源--> <mvc:default-servlet-handler/> <!--开启视图注解驱动器--> <mvc:annotation-driven /> <mvc:view-controller path="/" view-name 阅读全文
posted @ 2023-09-15 10:46 努力是一种常态 阅读(36) 评论(0) 推荐(0) 编辑
摘要:2023-09-15 web.xml <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web- 阅读全文
posted @ 2023-09-15 17:05 努力是一种常态 阅读(458) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示