[包学包会-项目步骤全程记录]SpringBoot前后端分离-房屋租赁管理系统实战项目-第一天

本文主要是介绍[包学包会-项目步骤全程记录]SpringBoot前后端分离-房屋租赁管理系统实战项目-第一天,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

看完这个系列可以做出来一个springboot+layui的前后端分离项目,喜欢可以点波关注,持续记录更新,有问题可以留言在下方看到都会回复,项目的问题可以跟我交流

技术架构

软件后端开发工具:IDEA 2018.1
Web容器:Apache Tomcat 8.5
项目管理工具:Maven3.6
后端技术:SpringBoot 2.3.3 + Mybatis-Plus 3.3 + JWT(SpringBoot框架)
前端技术:Jquery Layui Echarts等

主框架: 架构采用 SpringBoot + Layui 前后端分离技术实现

功能概述

房屋租赁系统主要包含
户主信息管理
租客信息管理
房屋信息管理
公告信息管理
管理员管理等

正式开始项目

一、项目数据库设计

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

/*==============================================================*/
/* DBMS name:      MySQL 5.0                                    */
/* Created on:     2021/6/16 18:57:06                           */
/*==============================================================*/drop table if exists contract;drop table if exists customer;drop table if exists dept;drop table if exists houses;drop table if exists lookhouse;drop table if exists lookhouse2;drop table if exists menu;drop table if exists owner;drop table if exists rentals;drop table if exists rentinfo;drop table if exists repair;drop table if exists role;drop table if exists role_menu;drop table if exists user;drop table if exists user_role;/*==============================================================*/
/* Table: contract                                              */
/*==============================================================*/
create table contract
(id                   int(10) not null auto_increment,customer_id          int(10),houses_id            int(10),qzrq                 datetime,kfrq                 datetime comment '0 代表女1 代表男',tzrq                 datetime,money                double(5,2),paymoney             varchar(200),create_time          datetime,djr                  varchar(20),update_time          datetime,xgr                  varchar(20),rent_id              int(10),primary key (id)
);alter table contract comment '合同信息表';/*==============================================================*/
/* Table: customer                                              */
/*==============================================================*/
create table customer
(id                   int not null auto_increment,identity             varchar(20),custname             varchar(20),password             varchar(20),sex                  varchar(20) comment '0 代表女1 代表男',address              varchar(120),phone                varchar(20),career               varchar(20),remarks              varchar(200),create_time          datetime,djr                  varchar(20),update_time          datetime,xgr                  varchar(20),primary key (id)
);alter table customer comment '租户信息表';/*==============================================================*/
/* Table: dept                                                  */
/*==============================================================*/
create table dept
(id                   int not null auto_increment,parent_id            int(20),name                 varchar(20),type                 int(10),sort                 int(10) comment '0 代表女1 代表男',status               int(10),create_time          datetime,create_by            varchar(20),update_time          datetime,primary key (id)
);alter table dept comment '部门信息表';/*==============================================================*/
/* Table: houses                                                */
/*==============================================================*/
create table houses
(id                   int not null auto_increment,numbers              varchar(20),owner_id             int(10),address              varchar(200),area                 double(5,2),imgs                 varchar(200),province             varchar(200),city                 varchar(200),county               varchar(200),price                double(5,2) comment '0 代表女1 代表男',status               int(10),remarks              varchar(200),create_time          datetime,create_by            varchar(20),update_time          datetime,primary key (id)
);alter table houses comment '房屋信息管理';/*==============================================================*/
/* Table: lookhouse                                             */
/*==============================================================*/
create table lookhouse
(id                   int(10) not null auto_increment,houses_id            int(10),customer_id          int(10),look_date            datetime,remarks              varchar(200),date                 datetime,djr                  varchar(20),update_time          datetime,xgr                  varchar(20),stutas               int(2) comment '0 未看房1 已看房',primary key (id)
);alter table lookhouse comment '看房信息表';/*==============================================================*/
/* Table: lookhouse2                                            */
/*==============================================================*/
create table lookhouse2
(id                   int(10) not null auto_increment,remarks              varchar(200),date                 datetime,djr                  varchar(20),primary key (id)
);alter table lookhouse2 comment '看房信息表';/*==============================================================*/
/* Table: menu                                                  */
/*==============================================================*/
create table menu
(id                   int not null auto_increment,parent_id            int(10),name                 varchar(20),type                 int(10),sort                 int(10) comment '0 代表女1 代表男',status               int(10),url                  varchar(20),permission           varchar(20),icon                 varchar(20),create_time          datetime,create_by            varchar(20),update_time          datetime,primary key (id)
);alter table menu comment '菜单信息表';/*==============================================================*/
/* Table: owner                                                 */
/*==============================================================*/
create table owner
(id                   int not null auto_increment,identity             varchar(20),custname             varchar(20),sex                  varchar(20) comment '0 代表女1 代表男',address              varchar(120),phone                varchar(20),career               varchar(20),remarks              varchar(200),create_time          datetime,djr                  varchar(20),primary key (id)
);alter table owner comment '房东信息表';/*==============================================================*/
/* Table: rentals                                               */
/*==============================================================*/
create table rentals
(id                   int(10) not null auto_increment,houses_id            int(10),customer_id          int(10),money                int(5),address2             varchar(200),ksrq                 datetime,jzrq                 datetime,jfr                  varchar(200),remarks              varchar(200),date                 datetime,djr                  varchar(20),update_time          datetime,xgr                  varchar(20),primary key (id)
);alter table rentals comment '收租信息表';/*==============================================================*/
/* Table: rentinfo                                              */
/*==============================================================*/
create table rentinfo
(id                   int(10) not null auto_increment,houses_id            int(10),customer_id          int(10),contract_id          char(10),address              char(10),remarks              char(10),create_time          datetime,djr                  varchar(20),update_time          datetime,xgr                  varchar(20),status               int(2),primary key (id)
);alter table rentinfo comment '租赁信息表';/*==============================================================*/
/* Table: repair                                                */
/*==============================================================*/
create table repair
(id                   int(10) not null auto_increment,houses_id            int(10),customer_id          int(10),content              varchar(200),address              varchar(200),remarks              varchar(200),date                 datetime,djr                  varchar(20),update_time          datetime,xgr                  varchar(20),status               int(2) comment '0 未修复1 已经修',name                 varchar(20),primary key (id)
);alter table repair comment '报修信息表';/*==============================================================*/
/* Table: role                                                  */
/*==============================================================*/
create table role
(id                   int not null auto_increment,parent_id            int(10),name                 varchar(20),type                 int(10),sort                 int(10) comment '0 代表女1 代表男',status               int(10),remarks              varchar(200),create_time          datetime,create_by            varchar(20),update_time          datetime,primary key (id)
);alter table role comment '角色信息表';/*==============================================================*/
/* Table: role_menu                                             */
/*==============================================================*/
create table role_menu
(id                   int not null auto_increment,menu_id              int(10),role_id              int(10),primary key (id)
);alter table role_menu comment '角色菜单关联表';/*==============================================================*/
/* Table: user                                                  */
/*==============================================================*/
create table user
(id                   int not null auto_increment,dept_id              int(10),username             varchar(20),password             varchar(20) comment '0 代表女1 代表男',realname             varchar(120),sex                  varchar(20),tel                  varchar(20),email                varchar(20),avatar               varchar(20),job_title            varchar(20),status               int(10),sort                 int(10),del_flag             int,create_by            varchar(20),update_time          datetime,create_time          datetime,primary key (id)
);alter table user comment '用户信息表';/*==============================================================*/
/* Table: user_role                                             */
/*==============================================================*/
create table user_role
(id                   int(10) not null auto_increment,user_id              int(10),role_id              int(10),create_by            varchar(20),update_time          datetime,primary key (id)
);alter table user_role comment '用户角色关联表';

二、springboot项目搭建

创建新工程

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

20210616191333611.png

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

在pom.xml文件中导入依赖和节点

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

注意注意:

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

一定要改成这个跟我一样的,不然后期报错会烦死的。。。。

<dependencies><!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>3.10</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!--        <dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>2.1.2</version></dependency>--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>8.0.21</version></dependency><!-- https://mvnrepository.com/artifact/com.alibaba/druid --><dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>1.1.22</version></dependency><!--mybatis和springboot整合--><!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter --><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>2.1.2</version></dependency><dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper-spring-boot-starter</artifactId><version>1.2.10</version></dependency><!-- mybatis-plus相关依赖 --><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.3.0</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope><exclusions><exclusion><groupId>org.junit.vintage</groupId><artifactId>junit-vintage-engine</artifactId></exclusion></exclusions></dependency><!-- https://mvnrepository.com/artifact/com.alibaba/fastjson --><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.68</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><optional>true</optional></dependency><!--        <dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-spring-boot-web-starter</artifactId><version>1.5.1</version></dependency>&lt;!&ndash; thymel对shiro的扩展坐标 &ndash;&gt;<dependency><groupId>com.github.theborakompanioni</groupId><artifactId>thymeleaf-extras-shiro</artifactId><version>2.0.0</version></dependency>--><!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui --><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger-ui</artifactId><version>2.10.3</version></dependency><!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --><!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.10.3</version></dependency><!--        <dependency><groupId>com.auth0</groupId><artifactId>java-jwt</artifactId><version>3.4.1</version></dependency>--><!-- https://mvnrepository.com/artifact/com.auth0/java-jwt --><dependency><groupId>com.auth0</groupId><artifactId>java-jwt</artifactId><version>3.10.0</version></dependency><dependency><groupId>io.jsonwebtoken</groupId><artifactId>jjwt</artifactId><version>0.9.1</version></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins><!--生产xml--><!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --><resources><resource><directory>src/main/java</directory><includes><include>**/*.yml</include><include>**/*.properties</include><include>**/*.xml</include></includes><filtering>false</filtering></resource><resource><directory>src/main/resources</directory><includes><include>**/*.yml</include><include>**/*.properties</include><include>**/*.xml</include><include>**/*.html</include><include>**/*.css</include><include>**/*.js</include><include>**/*.*</include></includes><filtering>false</filtering></resource></resources></build>

 

导入

20210616191958818.png

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

在controller下写个测试类

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

执行测试,注意要加一段代码 就是因为配置了 Spring 的数据组件,但是你没有配置相应的数据源。调试可能不成功

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

至此搭建springboot完成

三、springboot配置文件

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

代码如下 数据库用户名密码等根据自己的写

#端口
server.port=8888
#根路径
server.servlet.context-path=/
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/rent?useUnicode=true&amp&characterEncoding=utf-8&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=285142#数据源
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
#mybatisPlus
mybatis-plus.mapper-locations=classpath:com/okyang/dao/*.xml
mybatis-plus.type-aliases-package=com.okyang.model# 热部署
spring.devtools.restart.enabled=true#  时间转化格式
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
# 这个是时区,一定要加,否则会默认为格林尼治时间,即少8小时
spring.jackson.time-zone=GMT+8# 打印sql日志
logging.level.com.yanzhen.dao=debug# 驼峰式
mybatis-plus.configuration.map-underscore-to-camel-case=true

四、创建web项目工程

使用layui

下载地址:
 https://github.com/zhongshaofa/layuimini/tree/v2-onepage
这里使用单页版本,页面不能满足所有的需求,需要额外设定特殊

也可以下载修改过的源码在百度云

链接:https://pan.baidu.com/s/1euQPqoZ21h80WjK0TPTogA 
提取码:0wb2 


五、springboot解决跨域访问问题

问题描述:对于前后端分离的项目来说,如果前端项目与后端项目部署在两个不同的域下,那么势
必会引起跨域问题的出现。
针对跨域问题,我们可能第一个想到的解决方案就是jsonp,并
且以前处理跨域问题我基本也是这么处理。但是jsonp方式也同样有不足,不管是对于前端
还是后端来说,写法与我们平常的ajax写法不同,同样后端也需要作出相应的更改。并
且,jsonp方式只能通过get请求方式来传递参数,当然也还有其它的不足之处,jQuery
ajax方式以jsonp类型发起跨域请求,其原理跟<script>脚本请求一样,因此使用jsonp时
也只能使用GET方式发起跨域请求。跨域请求需要服务端配合,设置callback,才能完成跨
域请求。针对于此,我并没有急着使用jsonp的方式来解决跨域问题,去网上找寻其它方
式,也就是本文主要所要讲的,在springboot中通过cors协议解决跨域问题。

Cors协议H5中的新特性:Cross-Origin
Resource Sharing(跨域资源共享)

通过它,我们的开发者(主要指后端开发者)可以决定资源是否能被跨域访问。cors是一
个w3c标准,它允许浏览器(目前ie8以下还不能被支持)像我们不同源的服务器发出
xmlHttpRequest请求,我们可以继续使用ajax进行请求访问。

因为浏览器的同源安全策略,浏览器只允许请求当前域的资源,而对其他域的资源表示不信任。那怎么才算跨域呢?

想跨域浏览器要给服务器发请求origin看服务器同不同意

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

服务器看到后再发出回应,表示可以放行

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTAzMTgz,size_16,color_FFFFFF,t_70

其中,最重要的就是Access-Control-Allow-Origin,标识允许哪个域的请求

所以我们要给项目配置Access-Control-Allow-Origin

方式一:一般用于springmvc

20210616215748362.png

package com.okyang.cors;
import org.springframework.stereotype.Component;import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;@Component
public class SimpleCORSFilter implements Filter {@Overridepublic void init(FilterConfig filterConfig) throws ServletException {}@Overridepublic void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {HttpServletResponse response = (HttpServletResponse) servletResponse;response.setHeader("Access-Control-Allow-Origin", "*");response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, HEAD");response.setHeader("Access-Control-Max-Age", "3600");response.setHeader("Access-Control-Allow-Headers", "access-control-allow-origin, authority, content-type, version-info, X-Requested-With");filterChain.doFilter(servletRequest, servletResponse);}@Overridepublic void destroy() {}
}

方式二:一般用于springboot(推荐)

20210616225911887.png

package com.okyang.cors;import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;//创建全局跨域配置类
@Configuration
public class CorsConfig extends WebMvcConfigurerAdapter {@Overridepublic void addCorsMappings(CorsRegistry registry) {registry.addMapping("/**").allowedOrigins("*").allowCredentials(true).allowedMethods("GET","POST","PUT","DELETE").maxAge(3600);
//        super.addCorsMappings(registry);}
}

两种方式都可以实现,第二种简单一些

 

这篇关于[包学包会-项目步骤全程记录]SpringBoot前后端分离-房屋租赁管理系统实战项目-第一天的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/337563

相关文章

Java图片压缩三种高效压缩方案详细解析

《Java图片压缩三种高效压缩方案详细解析》图片压缩通常涉及减少图片的尺寸缩放、调整图片的质量(针对JPEG、PNG等)、使用特定的算法来减少图片的数据量等,:本文主要介绍Java图片压缩三种高效... 目录一、基于OpenCV的智能尺寸压缩技术亮点:适用场景:二、JPEG质量参数压缩关键技术:压缩效果对比

Java调用C++动态库超详细步骤讲解(附源码)

《Java调用C++动态库超详细步骤讲解(附源码)》C语言因其高效和接近硬件的特性,时常会被用在性能要求较高或者需要直接操作硬件的场合,:本文主要介绍Java调用C++动态库的相关资料,文中通过代... 目录一、直接调用C++库第一步:动态库生成(vs2017+qt5.12.10)第二步:Java调用C++

springboot+dubbo实现时间轮算法

《springboot+dubbo实现时间轮算法》时间轮是一种高效利用线程资源进行批量化调度的算法,本文主要介绍了springboot+dubbo实现时间轮算法,文中通过示例代码介绍的非常详细,对大家... 目录前言一、参数说明二、具体实现1、HashedwheelTimer2、createWheel3、n

Java利用docx4j+Freemarker生成word文档

《Java利用docx4j+Freemarker生成word文档》这篇文章主要为大家详细介绍了Java如何利用docx4j+Freemarker生成word文档,文中的示例代码讲解详细,感兴趣的小伙伴... 目录技术方案maven依赖创建模板文件实现代码技术方案Java 1.8 + docx4j + Fr

SpringBoot首笔交易慢问题排查与优化方案

《SpringBoot首笔交易慢问题排查与优化方案》在我们的微服务项目中,遇到这样的问题:应用启动后,第一笔交易响应耗时高达4、5秒,而后续请求均能在毫秒级完成,这不仅触发监控告警,也极大影响了用户体... 目录问题背景排查步骤1. 日志分析2. 性能工具定位优化方案:提前预热各种资源1. Flowable

基于SpringBoot+Mybatis实现Mysql分表

《基于SpringBoot+Mybatis实现Mysql分表》这篇文章主要为大家详细介绍了基于SpringBoot+Mybatis实现Mysql分表的相关知识,文中的示例代码讲解详细,感兴趣的小伙伴可... 目录基本思路定义注解创建ThreadLocal创建拦截器业务处理基本思路1.根据创建时间字段按年进

Win11安装PostgreSQL数据库的两种方式详细步骤

《Win11安装PostgreSQL数据库的两种方式详细步骤》PostgreSQL是备受业界青睐的关系型数据库,尤其是在地理空间和移动领域,:本文主要介绍Win11安装PostgreSQL数据库的... 目录一、exe文件安装 (推荐)下载安装包1. 选择操作系统2. 跳转到EDB(PostgreSQL 的

Python3.6连接MySQL的详细步骤

《Python3.6连接MySQL的详细步骤》在现代Web开发和数据处理中,Python与数据库的交互是必不可少的一部分,MySQL作为最流行的开源关系型数据库管理系统之一,与Python的结合可以实... 目录环境准备安装python 3.6安装mysql安装pymysql库连接到MySQL建立连接执行S

Python获取中国节假日数据记录入JSON文件

《Python获取中国节假日数据记录入JSON文件》项目系统内置的日历应用为了提升用户体验,特别设置了在调休日期显示“休”的UI图标功能,那么问题是这些调休数据从哪里来呢?我尝试一种更为智能的方法:P... 目录节假日数据获取存入jsON文件节假日数据读取封装完整代码项目系统内置的日历应用为了提升用户体验,

Java编译生成多个.class文件的原理和作用

《Java编译生成多个.class文件的原理和作用》作为一名经验丰富的开发者,在Java项目中执行编译后,可能会发现一个.java源文件有时会产生多个.class文件,从技术实现层面详细剖析这一现象... 目录一、内部类机制与.class文件生成成员内部类(常规内部类)局部内部类(方法内部类)匿名内部类二、