上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 32 下一页
摘要: 使用springboot默认创建项目,是application.properties,改成yml格式时,需要注意以下几点: 注释中不能用中文 yml格式,采用tree形状,key和value中的“冒号",冒号与值之间要有空格,如 username: root 同一级别节点格式要对齐,下面红包部分由于 阅读全文
posted @ 2020-11-12 10:06 低调码农哥! 阅读(1413) 评论(0) 推荐(1)
摘要: 由于我使用的是Mysql数据库,这里需要在准备一个连接mysql数据库的驱动jar包 Mybatis属于半自动ORM,在使用这个框架中,工作量最大的就是书写Mapping的映射文件,由于手动书写很容易出错,我们可以利用Mybatis-Generator来帮我们自动生成文件。 和Hibernate逆向 阅读全文
posted @ 2020-11-10 17:49 低调码农哥! 阅读(330) 评论(0) 推荐(0)
摘要: 一、下载 tomcat下载链接:https://tomcat.apache.org/ 1、进入tomcat官网后,选择需要下载的版本。我使用的是tomcat9,所以在这我选择tomcat9 2、选择zip(pgp,sha2,sha512)进行下载,下载zip的好处就是不用安装 ,直接下载解压就可以使 阅读全文
posted @ 2020-11-09 17:55 低调码农哥! 阅读(12929) 评论(0) 推荐(0)
摘要: 在Tomcat安装目录下,找到conf/logging.properties文件,打开后,找到 java.util.logging.ConsoleHandler.encoding的配置项,将其值修改为GBK即可。 java.util.logging.ConsoleHandler.encoding = 阅读全文
posted @ 2020-11-09 17:53 低调码农哥! 阅读(1517) 评论(0) 推荐(0)
摘要: 调用接口Controller类 @ApiOperation("查询列表") @PostMapping("/selectList") public Result selectList(@RequestBody User_InfoListRequest userInfo ) { Page page = 阅读全文
posted @ 2020-11-09 16:48 低调码农哥! 阅读(2561) 评论(0) 推荐(0)
摘要: pom.xml文件添加引用,注意此种分页不是基于原生PageHelper分页 <!--pageHelper--> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-star 阅读全文
posted @ 2020-11-06 14:29 低调码农哥! 阅读(704) 评论(0) 推荐(0)
摘要: 1、@Autowired与@Resource都可以用来装配bean. 都可以写在字段上,或写在setter方法上。 2、@Autowired默认按类型装配(这个注解是属业spring的),默认情况下必须要求依赖对象必须存在,如果要允许null 值,可以设置它的required属性为false,如:@ 阅读全文
posted @ 2020-10-30 13:26 低调码农哥! 阅读(260) 评论(0) 推荐(0)
摘要: Spring框架还提供了CorsFilter。在这种情况下,不用使用@CrossOrigin或WebMvcConfigurer#addCorsMappings(CorsRegistry),例如,可以在Spring Boot应用程序中声明如下的过滤器: @Configuration public cl 阅读全文
posted @ 2020-10-29 15:07 低调码农哥! 阅读(756) 评论(0) 推荐(0)
摘要: Union All/Union/Intersect操作 适用场景:对两个集合的处理,例如追加、合并、取相同项、相交项等等。 Concat(连接) 说明:连接不同的集合,不会自动过滤相同项;延迟。 1.简单形式: var q = ( from c in db.Customers select c.Ph 阅读全文
posted @ 2020-10-27 17:26 低调码农哥! 阅读(458) 评论(0) 推荐(0)
摘要: services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1).AddJsonOptions(options => { //全局格式化处理 options.SerializerSettings.DateForma 阅读全文
posted @ 2020-10-26 14:41 低调码农哥! 阅读(561) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 32 下一页