09 2023 档案

摘要:2023-09-27 阅读全文
posted @ 2023-09-27 15:39 努力是一种常态 阅读(101) 评论(0) 推荐(0) 编辑
摘要:2023-09-18 <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.2.16</version> </dependency> appl 阅读全文
posted @ 2023-09-18 21:51 努力是一种常态 阅读(233) 评论(0) 推荐(0) 编辑
摘要:2023-09-18 package com.hh.controller; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.w 阅读全文
posted @ 2023-09-18 16:52 努力是一种常态 阅读(116) 评论(0) 推荐(0) 编辑
摘要:2023-09-17 package com.hh.springboot05.config; import com.hh.springboot05.bean.Pet; import org.springframework.context.annotation.Bean; import org.spr 阅读全文
posted @ 2023-09-17 21:50 努力是一种常态 阅读(42) 评论(0) 推荐(0) 编辑
摘要:2023-09-17 spring: mvc: hiddenmethod: filter: enabled: true server: servlet: encoding: charset: UTF-8 force: true enabled: true 阅读全文
posted @ 2023-09-17 19:02 努力是一种常态 阅读(88) 评论(0) 推荐(0) 编辑
摘要:2023-09-17 加载图片的静态资源可以放在resources下面的四个文件夹中,命名必须为 (1)“META-INF”下的“resources” 或者(2)public 或者(3)resources 或者(4)static application.yml 设置静态资源的访问路径 设置静态资源存 阅读全文
posted @ 2023-09-17 17:48 努力是一种常态 阅读(533) 评论(0) 推荐(0) 编辑
摘要:2023-09-16 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.a 阅读全文
posted @ 2023-09-16 17:27 努力是一种常态 阅读(18) 评论(0) 推荐(0) 编辑
摘要:2023-09-16 导入的依赖 <dependencies> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.4</version> 阅读全文
posted @ 2023-09-16 12:39 努力是一种常态 阅读(58) 评论(0) 推荐(0) 编辑
摘要:2023-09-16 方式一 springmvc.xml <!--配置异常处理器--> <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> <property name="exce 阅读全文
posted @ 2023-09-16 11:37 努力是一种常态 阅读(18) 评论(0) 推荐(0) 编辑
摘要:2023-09-16 springmvc.xml <!--配置拦截器--> <mvc:interceptors> <mvc:interceptor> <!--配置需要拦截的请求的请求路径--> <mvc:mapping path="/**"/> <!--配置需要排除拦截的请求的请求路径--> <mv 阅读全文
posted @ 2023-09-16 11:06 努力是一种常态 阅读(146) 评论(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 努力是一种常态 阅读(441) 评论(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 努力是一种常态 阅读(35) 评论(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 努力是一种常态 阅读(44) 评论(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 努力是一种常态 阅读(37) 评论(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 努力是一种常态 阅读(136) 评论(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 努力是一种常态 阅读(107) 评论(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 努力是一种常态 阅读(38) 评论(0) 推荐(0) 编辑
摘要:2023-09-12 StoreHouseMapper /** * 批量添加 */ void insertMoreSH(@Param("storeHouses") List<StoreHouse> storeHouses); /** * 批量删除方式一 */ void deleteMoreSH(@P 阅读全文
posted @ 2023-09-12 15:13 努力是一种常态 阅读(65) 评论(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 努力是一种常态 阅读(19) 评论(0) 推荐(0) 编辑
摘要:2023-09-12 仓库 StoreHouseMapper /** * 分步查询 * 首先通过仓库的id查询出仓库 */ StoreHouse getSHAndGoodsByStepOne(@Param("id")Integer id); StoreHouseMapper.xml <resultM 阅读全文
posted @ 2023-09-12 08:52 努力是一种常态 阅读(40) 评论(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 努力是一种常态 阅读(11) 评论(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 努力是一种常态 阅读(72) 评论(0) 推荐(0) 编辑
摘要:2023-09-11 阅读全文
posted @ 2023-09-11 18:13 努力是一种常态 阅读(36) 评论(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 努力是一种常态 阅读(87) 评论(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 努力是一种常态 阅读(37) 评论(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 努力是一种常态 阅读(226) 评论(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 努力是一种常态 阅读(318) 评论(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 努力是一种常态 阅读(141) 评论(0) 推荐(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 努力是一种常态 阅读(248) 评论(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 努力是一种常态 阅读(155) 评论(2) 推荐(0) 编辑
摘要: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 努力是一种常态 阅读(59) 评论(0) 推荐(0) 编辑
摘要:2023-09-09 BusinessException package com.hh.exception; /** * @author hh * @version 1.0 * @DATE 2023-09-09 9:39:49 */ public class BusinessException ex 阅读全文
posted @ 2023-09-09 10:09 努力是一种常态 阅读(20) 评论(0) 推荐(0) 编辑
摘要:2023-09-09 注意,注意,一定要注意,mybatis的jar包与mybatis-spring的jar包的版本,一定要看这两个jar包的版本下面是与java8匹配的版本 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" 阅读全文
posted @ 2023-09-09 00:32 努力是一种常态 阅读(23) 评论(0) 推荐(0) 编辑
摘要:2023-09-08 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.15.2</version> </dependency 阅读全文
posted @ 2023-09-08 11:20 努力是一种常态 阅读(28) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta 阅读全文
posted @ 2023-09-07 17:09 努力是一种常态 阅读(308) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 注意:spring整合junit中的依赖要和spring-context的依赖版本相一致 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version> 阅读全文
posted @ 2023-09-07 15:11 努力是一种常态 阅读(47) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 jdbc.properties 注意里面的url中此时里面书写的是&而不是转移之后的,以及要注意数据库的名称是否存在 jdbc.driverClassName=com.mysql.cj.jdbc.Driver jdbc.url=jdbc:mysql://localhost:33 阅读全文
posted @ 2023-09-07 14:59 努力是一种常态 阅读(76) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 package com.hh.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configura 阅读全文
posted @ 2023-09-07 12:18 努力是一种常态 阅读(16) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http:// 阅读全文
posted @ 2023-09-07 11:54 努力是一种常态 阅读(30) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 applicationContext.xml 步骤: 需要设置命名空间 设置jdbc.properties的占位符 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.o 阅读全文
posted @ 2023-09-07 10:23 努力是一种常态 阅读(126) 评论(0) 推荐(0) 编辑
摘要:2023-09-04 今天练习element组件的时候,引入element样式和脚本文件以及vue的组件之后,导入简单element组件练习之后,查看组件的时候,样式一直出不来,经过我多次排查,终于发现,导入的三个内容是有顺序排序要求的。必须先导入vue,然后再导入其他的两个。 <!DOCTYPE 阅读全文
posted @ 2023-09-04 21:46 努力是一种常态 阅读(14) 评论(0) 推荐(0) 编辑
摘要:2023-09-04 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.47</version> </dependency> 转换的简单案例 package com.h 阅读全文
posted @ 2023-09-04 17:04 努力是一种常态 阅读(130) 评论(0) 推荐(0) 编辑
摘要:2023-09-04 package com.hh.util; import javax.imageio.ImageIO; import java.awt.*; import java.awt.geom.AffineTransform; import java.awt.image.BufferedI 阅读全文
posted @ 2023-09-04 13:24 努力是一种常态 阅读(132) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.a 阅读全文
posted @ 2023-09-03 21:13 努力是一种常态 阅读(18) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 注册 package com.hh.web; /** * @author hh * @version 1.0 * @DATE 2023-09-03 14:56:28 */ import com.hh.mapper.UserMapper; import com.hh.pojo.U 阅读全文
posted @ 2023-09-03 15:22 努力是一种常态 阅读(56) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 方式一 package com.hh.util; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibati 阅读全文
posted @ 2023-09-03 15:19 努力是一种常态 阅读(16) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 导入字节工具包,可以用于复制输入流与输出流 <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> <version>1.3.2</version> </dep 阅读全文
posted @ 2023-09-03 14:00 努力是一种常态 阅读(17) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 package com.hh.response; /** * @author hh * @version 1.0 * @DATE 2023-09-03 13:32:10 */ import javax.servlet.ServletException; import javax 阅读全文
posted @ 2023-09-03 13:53 努力是一种常态 阅读(22) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 package com.hh.RequestAndResponse; /** * @author hh * @version 1.0 * @DATE 2023-09-03 12:51:44 */ import javax.servlet.ServletException; im 阅读全文
posted @ 2023-09-03 13:15 努力是一种常态 阅读(50) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> < 阅读全文
posted @ 2023-09-03 11:30 努力是一种常态 阅读(48) 评论(0) 推荐(0) 编辑
摘要:2023-09-02 <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapp 阅读全文
posted @ 2023-09-02 12:14 努力是一种常态 阅读(46) 评论(0) 推荐(0) 编辑
摘要:2023-09-02 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis 阅读全文
posted @ 2023-09-02 10:57 努力是一种常态 阅读(119) 评论(2) 推荐(0) 编辑
摘要:2023-09-02 UserMapper.xml模板 方式一: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis. 阅读全文
posted @ 2023-09-02 10:56 努力是一种常态 阅读(237) 评论(0) 推荐(0) 编辑
摘要:2023-09-02 依赖的jar包 <!-- log4j --><dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version></dependency> 配置文件 <?xm 阅读全文
posted @ 2023-09-02 10:49 努力是一种常态 阅读(78) 评论(0) 推荐(0) 编辑
摘要:2023-09-01 今天练习JDBC,设置好连接语句,创建好sql,更新都弄好了,一直转圈圈,不出结果。真的是见了鬼了,之前还好好的。疑惑太大,一行一行的看,最后我发现一个问题 建立连接时,用户名起的变量名必须为username,这样才能出来,不知道为啥,大冤种。 下面是正确的 package c 阅读全文
posted @ 2023-09-01 19:25 努力是一种常态 阅读(27) 评论(1) 推荐(0) 编辑
摘要:2023-09-01 jdbc:mysql://localhost:3306/xxxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT&rewriteBatchedStatements=true 阅读全文
posted @ 2023-09-01 18:54 努力是一种常态 阅读(450) 评论(1) 推荐(0) 编辑

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