springboot3.2.4+Mybatis-plus在graalvm21环境下打包exe
springboot3.2.4+Mybatis-plus在graalvm21环境下打包exe
- 前提条件为之前已经能直接打包springboot3.2.4项目了
- 然后在此基础上接入Mybatis-plus,然后能够正常进行打包exe并且执行,参考之前的文章进行打包
核心配置如下
package com.example.demo.config;import com.baomidou.mybatisplus.annotation.IEnum;
import com.baomidou.mybatisplus.core.MybatisParameterHandler;
import com.baomidou.mybatisplus.core.MybatisXMLLanguageDriver;
import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.handlers.CompositeEnumTypeHandler;
import com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.core.toolkit.support.SerializedLambda;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.GsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.commons.logging.LogFactory;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.cache.decorators.FifoCache;
import org.apache.ibatis.cache.decorators.LruCache;
import org.apache.ibatis.cache.decorators.SoftCache;
import org.apache.ibatis.cache.decorators.WeakCache;
import org.apache.ibatis.cache.impl.PerpetualCache;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.executor.parameter.ParameterHandler;
import org.apache.ibatis.executor.resultset.ResultSetHandler;
import org.apache.ibatis.executor.statement.BaseStatementHandler;
import org.apache.ibatis.executor.statement.RoutingStatementHandler;
import org.apache.ibatis.executor.statement.StatementHandler;
import org.apache.ibatis.javassist.util.proxy.ProxyFactory;
import org.apache.ibatis.javassist.util.proxy.RuntimeSupport;
import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl;
import org.apache.ibatis.logging.jdk14.Jdk14LoggingImpl;
import org.apache.ibatis.logging.log4j2.Log4j2Impl;
import org.apache.ibatis.logging.nologging.NoLoggingImpl;
import org.apache.ibatis.logging.slf4j.Slf4jImpl;
import org.apache.ibatis.logging.stdout.StdOutImpl;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.reflection.TypeParameterResolver;
import org.apache.ibatis.scripting.defaults.RawLanguageDriver;
import org.apache.ibatis.scripting.xmltags.XMLLanguageDriver;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.mapper.MapperFactoryBean;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.beans.PropertyValue;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContribution;
import org.springframework.beans.factory.aot.BeanFactoryInitializationAotProcessor;
import org.springframework.beans.factory.aot.BeanRegistrationExcludeFilter;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.ConstructorArgumentValues;
import org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor;
import org.springframework.beans.factory.support.RegisteredBean;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportRuntimeHints;
import org.springframework.core.ResolvableType;
import org.springframework.util.ClassUtils;
import org.springframework.util.ReflectionUtils;import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;/*** @author lyk* @since 2024-03-30*/
@Configuration(proxyBeanMethods = false)
@ImportRuntimeHints(MyBatisNativeConfiguration.MyBaitsRuntimeHintsRegistrar.class)
public class MyBatisNativeConfiguration {@BeanMyBatisBeanFactoryInitializationAotProcessor myBatisBeanFactoryInitializationAotProcessor() {return new MyBatisBeanFactoryInitializationAotProcessor();}@Beanstatic MyBatisMapperFactoryBeanPostProcessor myBatisMapperFactoryBeanPostProcessor() {return new MyBatisMapperFactoryBeanPostProcessor();}static class MyBaitsRuntimeHintsRegistrar implements RuntimeHintsRegistrar {@Overridepublic void registerHints(RuntimeHints hints, ClassLoader classLoader) {Stream.of(RawLanguageDriver.class,// TODO 增加了MybatisXMLLanguageDriver.classXMLLanguageDriver.class, MybatisXMLLanguageDriver.class,RuntimeSupport.class,ProxyFactory.class,Slf4jImpl.class,Log.class,JakartaCommonsLoggingImpl.class,Log4j2Impl.class,Jdk14LoggingImpl.class,StdOutImpl.class,NoLoggingImpl.class,SqlSessionFactory.class,PerpetualCache.class,FifoCache.class,LruCache.class,SoftCache.class,WeakCache.class,//TODO 增加了MybatisSqlSessionFactoryBean.classSqlSessionFactoryBean.class, MybatisSqlSessionFactoryBean.class,ArrayList.class,HashMap.class,TreeSet.class,HashSet.class).forEach(x -> hints.reflection().registerType(x, MemberCategory.values()));Stream.of("org/apache/ibatis/builder/xml/*.dtd","org/apache/ibatis/builder/xml/*.xsd").forEach(hints.resources()::registerPattern);hints.serialization().registerType(SerializedLambda.class);hints.serialization().registerType(SFunction.class);hints.serialization().registerType(java.lang.invoke.SerializedLambda.class);hints.reflection().registerType(SFunction.class);hints.reflection().registerType(SerializedLambda.class);hints.reflection().registerType(java.lang.invoke.SerializedLambda.class);hints.proxies().registerJdkProxy(StatementHandler.class);hints.proxies().registerJdkProxy(Executor.class);hints.proxies().registerJdkProxy(ResultSetHandler.class);hints.proxies().registerJdkProxy(ParameterHandler.class);// hints.reflection().registerType(MybatisPlusInterceptor.class);hints.reflection().registerType(AbstractWrapper.class,MemberCategory.values());hints.reflection().registerType(LambdaQueryWrapper.class,MemberCategory.values());hints.reflection().registerType(LambdaUpdateWrapper.class,MemberCategory.values());hints.reflection().registerType(UpdateWrapper.class,MemberCategory.values());hints.reflection().registerType(QueryWrapper.class,MemberCategory.values());hints.reflection().registerType(BoundSql.class,MemberCategory.DECLARED_FIELDS);hints.reflection().registerType(RoutingStatementHandler.class,MemberCategory.DECLARED_FIELDS);hints.reflection().registerType(BaseStatementHandler.class,MemberCategory.DECLARED_FIELDS);hints.reflection().registerType(MybatisParameterHandler.class,MemberCategory.DECLARED_FIELDS);hints.reflection().registerType(IEnum.class,MemberCategory.INVOKE_PUBLIC_METHODS);// register typeHandlerhints.reflection().registerType(CompositeEnumTypeHandler.class, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);hints.reflection().registerType(FastjsonTypeHandler.class, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);hints.reflection().registerType(GsonTypeHandler.class, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);hints.reflection().registerType(JacksonTypeHandler.class, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);hints.reflection().registerType(MybatisEnumTypeHandler.class, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);}}static class MyBatisBeanFactoryInitializationAotProcessorimplements BeanFactoryInitializationAotProcessor, BeanRegistrationExcludeFilter {private final Set<Class<?>> excludeClasses = new HashSet<>();MyBatisBeanFactoryInitializationAotProcessor() {excludeClasses.add(MapperScannerConfigurer.class);}@Override public boolean isExcludedFromAotProcessing(RegisteredBean registeredBean) {return excludeClasses.contains(registeredBean.getBeanClass());}@Overridepublic BeanFactoryInitializationAotContribution processAheadOfTime(ConfigurableListableBeanFactory beanFactory) {String[] beanNames = beanFactory.getBeanNamesForType(MapperFactoryBean.class);if (beanNames.length == 0) {return null;}return (context, code) -> {RuntimeHints hints = context.getRuntimeHints();for (String beanName : beanNames) {BeanDefinition beanDefinition = beanFactory.getBeanDefinition(beanName.substring(1));PropertyValue mapperInterface = beanDefinition.getPropertyValues().getPropertyValue("mapperInterface");if (mapperInterface != null && mapperInterface.getValue() != null) {Class<?> mapperInterfaceType = (Class<?>) mapperInterface.getValue();if (mapperInterfaceType != null) {registerReflectionTypeIfNecessary(mapperInterfaceType, hints);hints.proxies().registerJdkProxy(mapperInterfaceType);hints.resources().registerPattern(mapperInterfaceType.getName().replace('.', '/').concat(".xml"));registerMapperRelationships(mapperInterfaceType, hints);}}}};}private void registerMapperRelationships(Class<?> mapperInterfaceType, RuntimeHints hints) {Method[] methods = ReflectionUtils.getAllDeclaredMethods(mapperInterfaceType);for (Method method : methods) {if (method.getDeclaringClass() != Object.class) {ReflectionUtils.makeAccessible(method);registerSqlProviderTypes(method, hints, SelectProvider.class, SelectProvider::value, SelectProvider::type);registerSqlProviderTypes(method, hints, InsertProvider.class, InsertProvider::value, InsertProvider::type);registerSqlProviderTypes(method, hints, UpdateProvider.class, UpdateProvider::value, UpdateProvider::type);registerSqlProviderTypes(method, hints, DeleteProvider.class, DeleteProvider::value, DeleteProvider::type);Class<?> returnType = MyBatisMapperTypeUtils.resolveReturnClass(mapperInterfaceType, method);registerReflectionTypeIfNecessary(returnType, hints);MyBatisMapperTypeUtils.resolveParameterClasses(mapperInterfaceType, method).forEach(x -> registerReflectionTypeIfNecessary(x, hints));}}}@SafeVarargsprivate <T extends Annotation> void registerSqlProviderTypes(Method method, RuntimeHints hints, Class<T> annotationType, Function<T, Class<?>>... providerTypeResolvers) {for (T annotation : method.getAnnotationsByType(annotationType)) {for (Function<T, Class<?>> providerTypeResolver : providerTypeResolvers) {registerReflectionTypeIfNecessary(providerTypeResolver.apply(annotation), hints);}}}private void registerReflectionTypeIfNecessary(Class<?> type, RuntimeHints hints) {if (!type.isPrimitive() && !type.getName().startsWith("java")) {hints.reflection().registerType(type, MemberCategory.values());}}}static class MyBatisMapperTypeUtils {private MyBatisMapperTypeUtils() {// NOP}static Class<?> resolveReturnClass(Class<?> mapperInterface, Method method) {Type resolvedReturnType = TypeParameterResolver.resolveReturnType(method, mapperInterface);return typeToClass(resolvedReturnType, method.getReturnType());}static Set<Class<?>> resolveParameterClasses(Class<?> mapperInterface, Method method) {return Stream.of(TypeParameterResolver.resolveParamTypes(method, mapperInterface)).map(x -> typeToClass(x, x instanceof Class ? (Class<?>) x : Object.class)).collect(Collectors.toSet());}private static Class<?> typeToClass(Type src, Class<?> fallback) {Class<?> result = null;if (src instanceof Class<?>) {if (((Class<?>) src).isArray()) {result = ((Class<?>) src).getComponentType();} else {result = (Class<?>) src;}} else if (src instanceof ParameterizedType) {ParameterizedType parameterizedType = (ParameterizedType) src;int index = (parameterizedType.getRawType() instanceof Class&& Map.class.isAssignableFrom((Class<?>) parameterizedType.getRawType())&& parameterizedType.getActualTypeArguments().length > 1) ? 1 : 0;Type actualType = parameterizedType.getActualTypeArguments()[index];result = typeToClass(actualType, fallback);}if (result == null) {result = fallback;}return result;}}static class MyBatisMapperFactoryBeanPostProcessor implements MergedBeanDefinitionPostProcessor, BeanFactoryAware {private static final org.apache.commons.logging.Log LOG = LogFactory.getLog(MyBatisMapperFactoryBeanPostProcessor.class);private static final String MAPPER_FACTORY_BEAN = "org.mybatis.spring.mapper.MapperFactoryBean";private ConfigurableBeanFactory beanFactory;@Overridepublic void setBeanFactory(BeanFactory beanFactory) {this.beanFactory = (ConfigurableBeanFactory) beanFactory;}@Overridepublic void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {if (ClassUtils.isPresent(MAPPER_FACTORY_BEAN, this.beanFactory.getBeanClassLoader())) {resolveMapperFactoryBeanTypeIfNecessary(beanDefinition);}}private void resolveMapperFactoryBeanTypeIfNecessary(RootBeanDefinition beanDefinition) {if (!beanDefinition.hasBeanClass() || !MapperFactoryBean.class.isAssignableFrom(beanDefinition.getBeanClass())) {return;}if (beanDefinition.getResolvableType().hasUnresolvableGenerics()) {Class<?> mapperInterface = getMapperInterface(beanDefinition);if (mapperInterface != null) {// Exposes a generic type information to context for prevent early initializingConstructorArgumentValues constructorArgumentValues = new ConstructorArgumentValues();constructorArgumentValues.addGenericArgumentValue(mapperInterface);beanDefinition.setConstructorArgumentValues(constructorArgumentValues);beanDefinition.setTargetType(ResolvableType.forClassWithGenerics(beanDefinition.getBeanClass(), mapperInterface));}}}private Class<?> getMapperInterface(RootBeanDefinition beanDefinition) {try {return (Class<?>) beanDefinition.getPropertyValues().get("mapperInterface");}catch (Exception e) {LOG.debug("Fail getting mapper interface type.", e);return null;}}}
}
package com.example.demo.config;import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;/*** @author lyk* @since 2024-03-30*/
@Configuration
//TODO 如果使用这个方式的话,记得一定要指定sqlSessionTemplateRef或sqlSessionFactoryRef https://github.com/mybatis/spring-boot-starter/wiki/Quick-Start-for-building-native-image#how-to-use-mapperscan
@MapperScan(basePackages = "com.example.demo.mapper", sqlSessionTemplateRef = "sqlSessionTemplate")
public class MybatisPlusConfig {@Beanpublic MybatisPlusInterceptor mybatisPlusInterceptor(){MybatisPlusInterceptor plusInterceptor = new MybatisPlusInterceptor();//plusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));//TODO 3.5.3.1 以下插件多的话,可能会报异常,这个在最新版本修改. https://github.com/baomidou/mybatis-plus/issues/5532
// plusInterceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
// plusInterceptor.addInnerInterceptor(new IllegalSQLInnerInterceptor());
// plusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());return plusInterceptor;}}
demo地址如下
https://gitee.com/lgbisha/springboot3-mybatis-plus/tree/master
相关文章:
springboot3.2.4+Mybatis-plus在graalvm21环境下打包exe
springboot3.2.4Mybatis-plus在graalvm21环境下打包exe 前提条件为之前已经能直接打包springboot3.2.4项目了然后在此基础上接入Mybatis-plus,然后能够正常进行打包exe并且执行,参考之前的文章进行打包 核心配置如下 package com.example.demo.config…...

Kubernetes(K8S)学习(二):K8S常用组件
K8S常用组件 一、 Controllers1、ReplicationController(RC)2、ReplicaSet(RS)3、Deployment 二、Labels and Selectors三、Namespace(命名空间)1、简介2、测试2.1、创建namespace2.2、创建pod 四、Network1、集群内:同一个Pod中的容器通信2、…...

如何使用群晖WebDAV实现固定公网地址同步Zotero文献管理器
文章目录 前言1. Docker 部署 Trfɪk2. 本地访问traefik测试3. Linux 安装cpolar4. 配置Traefik公网访问地址5. 公网远程访问Traefik6. 固定Traefik公网地址 前言 Trfɪk 是一个云原生的新型的 HTTP 反向代理、负载均衡软件,能轻易的部署微服务。它支持多种后端 (D…...

【JavaSE】初识线程,线程与进程的区别
文章目录 ✍线程是什么?✍线程和进程的区别✍线程的创建1.继承 Thread 类2.实现Runnable接口3.匿名内部类4.匿名内部类创建 Runnable ⼦类对象5.lambda 表达式创建 Runnable ⼦类对象 ✍线程是什么? ⼀个线程就是⼀个 “执行流”. 每个线程之间都可以按…...
全国青少年软件编程(Python)等级考试三级考试真题2023年9月——持续更新.....
青少年软件编程(Python)等级考试试卷(三级) 分数:100 题数:38 一、单选题(共25题,共50分) 1.有一组数据存在列表中,things[“桌子”,“椅子”,“茶几”,“沙发”,“西瓜”,“苹果”,“草莓”,“…...

react-navigation:
我的仓库地址:https://gitee.com/ruanjianbianjing/bj-hybrid react-navigation: 学习文档:https://reactnavigation.org 安装核心包: npm install react-navigation/native 安装react-navigation/native本身依赖的相关包: react-nativ…...
nginx负载均衡模式
轮询 (Round Robin) 用法:这是Nginx默认的负载均衡策略。每个请求会按顺序分配给upstream中的后端服务器,即按照配置的服务器列表顺序依次分配。 upstream backend {server backend1.example.com;server backend2.example.com;server backend3.example.…...

手写简易操作系统(十七)--编写键盘驱动
前情提要 上一节我们实现了锁与信号量,这一节我们就可以实现键盘驱动了,访问键盘输入的数据也属于临界区资源,所以需要锁的存在。 一、键盘简介 之前的 ps/2 键盘使用的是中断驱动的,在当时,按下键盘就会触发中断&a…...
springboot中基于RestTemplate 类 实现调用第三方API接口【POST版本】
https://blog.csdn.net/Drug_/article/details/135111675 这一篇的升级版 还是先配置文件 package com.init.config;import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.clie…...

编程器固件修改教程
首发csdn,转载请说明出处,保留一切权益。 关于编程器固件 所谓编程器固件是用编程器读取嵌入式设备的FLASH存储数据生成的文件,类似于直接用工具复制整个硬盘 编程器固件与普通固件的差异 编程器固件是用特定的结构(按顺序、大小)将一些文件系…...
Python从原Excel表中抽出数据存入同一文件的新的Sheet(附源码)
python读取excel数据。Python在从原Excel表中抽出数据并存储到同一文件的新的Sheet中的功能,充分展示了其在数据处理和自动化操作方面的强大能力。这一功能不仅简化了数据迁移的过程,还提高了数据处理的效率,为数据分析和管理工作带来了极大的…...
计算机网络实验六:路由信息协议RIP
目录 6 实验六:路由信息协议RIP 6.1 实验目的 6.2 实验步骤 6.2.1 构建网络拓扑、配置各网络设备 6.2.2 网络功能验证测试 6.3 实验总结 6 实验六:路由信息协议RIP 6.1 实验目的 (1)学习RIP协议的工作原理和特点 (2)学习如何选择最短路径路由。 (3)进一步掌握…...

MySQL数据库备份策略与实践详解
目录 引言 一、MySQL数据库备份的重要性 (一)数据丢失的原因 (二)数据丢失的后果 二、MySQL备份类型 (一)根据数据库状态 (二)根据数据的完整性 (三)…...

String类相关oj练习
前言: 此处练习对应博客文章:公主,王子,请点击 1.第一次只出现一次的字符 做题首先看清要求和提示: 给定一个字符串 s ,找到 它的第一个不重复的字符,并返回它的索引 。如果不…...

【Linux】进程实践项目 —— 自主shell编写
送给大家一句话: 不管前方的路有多苦,只要走的方向正确,不管多么崎岖不平,都比站在原地更接近幸福。 —— 宫崎骏《千与千寻》 自主shell命令编写 1 前言2 项目实现2.1 创建命令行2.2 获取命令2.3 分割命令2.4 运行命令 3 源代码…...

基于SpringBoot和Vue的学生笔记共享平台的设计与实现
今天要和大家聊的是一款基于SpringBoot和Vue的学生笔记共享平台的设计与实现 !!! 有需要的小伙伴可以通过文章末尾名片咨询我哦!!! 💕💕作者:李同学 💕&…...

C++心决之命名空间、重载函数和引用
目录 1. C关键字(C98) 2. 命名空间 2.1 命名空间定义 2.2 命名空间使用 3. C输入&输出 4. 缺省参数 4.1 缺省参数概念 4.2 缺省参数分类 5. 函数重载 5.1 函数重载概念 5.2 C支持函数重载的原理--名字修饰(name Mangling) 6. 引用 6.1 引用概念 6.2 引用特性…...
higress使用了解
higress使用了解 了解下 http-echo、httpbin 镜像使用 未按文档实际搭建,但大致是这样 官方文档:https://higress.io/zh-cn/docs/overview/what-is-higress 了解:利用sealos快速安装kubernetes集群:https://note.youdao.com/s…...

Swagger3探索之游龙入海
引言 后端开发中常用的接口调用工具一般使用Postman、ApiPost工具,但后期需要与前端联调,要补充接口文档花费大量时间,此时Swagger3应运而生,大大提高沟通交流的效率。 引用依赖 <!-- Swagger3 调用方式 http://ip:port/swa…...

javaWeb项目-学生考勤管理系统功能介绍
项目关键技术 开发工具:IDEA 、Eclipse 编程语言: Java 数据库: MySQL5.7 框架:ssm、Springboot 前端:Vue、ElementUI 关键技术:springboot、SSM、vue、MYSQL、MAVEN 数据库工具:Navicat、SQLyog 1、JAVA技术 JavaSc…...

idea大量爆红问题解决
问题描述 在学习和工作中,idea是程序员不可缺少的一个工具,但是突然在有些时候就会出现大量爆红的问题,发现无法跳转,无论是关机重启或者是替换root都无法解决 就是如上所展示的问题,但是程序依然可以启动。 问题解决…...

【Oracle APEX开发小技巧12】
有如下需求: 有一个问题反馈页面,要实现在apex页面展示能直观看到反馈时间超过7天未处理的数据,方便管理员及时处理反馈。 我的方法:直接将逻辑写在SQL中,这样可以直接在页面展示 完整代码: SELECTSF.FE…...

MongoDB学习和应用(高效的非关系型数据库)
一丶 MongoDB简介 对于社交类软件的功能,我们需要对它的功能特点进行分析: 数据量会随着用户数增大而增大读多写少价值较低非好友看不到其动态信息地理位置的查询… 针对以上特点进行分析各大存储工具: mysql:关系型数据库&am…...
Robots.txt 文件
什么是robots.txt? robots.txt 是一个位于网站根目录下的文本文件(如:https://example.com/robots.txt),它用于指导网络爬虫(如搜索引擎的蜘蛛程序)如何抓取该网站的内容。这个文件遵循 Robots…...

ArcGIS Pro制作水平横向图例+多级标注
今天介绍下载ArcGIS Pro中如何设置水平横向图例。 之前我们介绍了ArcGIS的横向图例制作:ArcGIS横向、多列图例、顺序重排、符号居中、批量更改图例符号等等(ArcGIS出图图例8大技巧),那这次我们看看ArcGIS Pro如何更加快捷的操作。…...
【碎碎念】宝可梦 Mesh GO : 基于MESH网络的口袋妖怪 宝可梦GO游戏自组网系统
目录 游戏说明《宝可梦 Mesh GO》 —— 局域宝可梦探索Pokmon GO 类游戏核心理念应用场景Mesh 特性 宝可梦玩法融合设计游戏构想要素1. 地图探索(基于物理空间 广播范围)2. 野生宝可梦生成与广播3. 对战系统4. 道具与通信5. 延伸玩法 安全性设计 技术选…...

技术栈RabbitMq的介绍和使用
目录 1. 什么是消息队列?2. 消息队列的优点3. RabbitMQ 消息队列概述4. RabbitMQ 安装5. Exchange 四种类型5.1 direct 精准匹配5.2 fanout 广播5.3 topic 正则匹配 6. RabbitMQ 队列模式6.1 简单队列模式6.2 工作队列模式6.3 发布/订阅模式6.4 路由模式6.5 主题模式…...

计算机基础知识解析:从应用到架构的全面拆解
目录 前言 1、 计算机的应用领域:无处不在的数字助手 2、 计算机的进化史:从算盘到量子计算 3、计算机的分类:不止 “台式机和笔记本” 4、计算机的组件:硬件与软件的协同 4.1 硬件:五大核心部件 4.2 软件&#…...
在鸿蒙HarmonyOS 5中使用DevEco Studio实现企业微信功能
1. 开发环境准备 安装DevEco Studio 3.1: 从华为开发者官网下载最新版DevEco Studio安装HarmonyOS 5.0 SDK 项目配置: // module.json5 {"module": {"requestPermissions": [{"name": "ohos.permis…...
作为测试我们应该关注redis哪些方面
1、功能测试 数据结构操作:验证字符串、列表、哈希、集合和有序的基本操作是否正确 持久化:测试aof和aof持久化机制,确保数据在开启后正确恢复。 事务:检查事务的原子性和回滚机制。 发布订阅:确保消息正确传递。 2、性…...