nexus3下载安装配置运行

2023-10-30 11:20

本文主要是介绍nexus3下载安装配置运行,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一、介绍

nexus是一个maven私服。

私服

私服是一种特殊的远程仓库,它是架设在局域网内的仓库服务,私服代理广域网上的远程仓库,供局域网内的用户使用。当Maven需要下载构件的时候,它从私服请求,如果 私服上不存在该构件,则从外部远程仓库下载,缓存在私服上之后,再为Maven的下载请求提供服务。
私服的好处:
a、节省自己的外网带宽
b、加速Maven构建
c、部署自己内部的第三方构件
d、提高稳定性,增强控制
e、降低中央仓库的负荷。

二、下载

网上很多文档说官网下载慢,但是能下载,但是我一直没下载下来,即使翻墙,也没有成功下载,最后从国内csdn网友的分享下载的。这里也分享一下:

链接:https://pan.baidu.com/s/1oN6p-v8r8kfHbaHUbtjEaA 
提取码:bn50

nexus为windows、osX、unix三个平台提供支持。我分享的版本是:nexus-3.20.1-01-win64.rar

三、安装

1、解压压缩包到指定文件夹,比如:D:\06.tools\nexus3,得到nexus-3.20.1-01文件夹和 sonatype-work 文件夹

nexus-3.16.2-01:是nexus服务器相关的文件

sonatype-work:是nexus工作的数据文件,上传下载的jar包就在这个文件夹下面。

四、启动

在命令提示符中进去D:\06.tools\nexus3\nexus-3.20.1-01\bin文件夹,执行命令:nexus /run,访问http://localhost:8081

五、使用

nexus3的使用

1.登录nexus

使用默认用户admin,密码admin123,登录。

2.管理私服本地仓库

2.1仓库类型

Nexus有4个【类型】的数据仓库,分别是hosted,proxy,group、virtual(基本不用)。

  • hosted 宿主仓库:主要用于部署无法从公共仓库获取的构件以及自己或第三方的项目构件;
  • proxy 代理仓库:代理公共的远程仓库;
  • group 仓库组:Nexus 通过仓库组统一管理多个仓库,这样我们在项目中直接请求仓库组即可请求到仓库组管理的多个仓库。

 

Nexus默认的仓库类型有以下四种:(上面的名字可以随便取,关键是它对应的是什么仓库类型)

   1)group(仓库组类型):又叫组仓库,用于方便开发人员自己设定的仓库;

   2)hosted(宿主类型):内部项目的发布仓库(内部开发人员,发布上去存放的仓库);

   3)proxy(代理类型):  从远程中央仓库中寻找数据的仓库(可以点击对应的仓库的Configuration页签下Remote Storage Location属性的值即被代理的远程仓库的路径);

   4)virtual(虚拟类型): 虚拟仓库(这个基本用不到,重点关注上面三个仓库的使用);

Policy(策略):表示该仓库为发布(Release)版本仓库还是快照(Snapshot)版本仓库;

2.2默认仓库

Nexus预定义了2个本地仓库,分别是maven-releases, maven-snapshots。

  • maven-releases:这里存放我们自己项目中发布的构建, 通常是Release版本的。
  • maven-snapshots:这个仓库非常的有用, 它的目的是让我们可以发布那些非release版本, 非稳定版本。

默认仓库介绍

   1)maven-central(proxy):      maven中央库,默认从https://repo1.maven.org/maven2/拉取jar

   2)maven-releases(hosted):   私库发行版jar

   3)maven-snapshots(hosted):私库快照(调试版本)jar

   4)maven-public(group):     仓库分组,把上面三个仓库组合在一起对外提供服务,在本地maven基础配置settings.xml中使用。

2.3仓库拉取jar包流程

1)Maven可直接从【hosted宿主仓库】下载构件,也可以从【proxy代理仓库】下载构件,而代理仓库间接的从所代理的【远程仓库】下载并缓存构件

2)为了方便,Maven可以从仓库组下载构件,而仓库组并没有实际的内容(下图中用虚线表示,它会转向包含的宿主仓库或者代理仓库获得实际构件的内容).

2.4创建自己的仓库

(~~非必要~~)直接使用Nexus预定义了2个本地仓库maven-releases, maven-snapshots就行,用来存放我们自己工程发布的jar包

根据类型选择其中一个:

如果是创建的proxy仓库或者hosted仓库,需要添加到公共仓库里。

2.5上传本地jar包

(~~非必要~~):直接通过工程deploy发布我们自己工程项目

3.使用nexus

3.1 maven中配置nexus

1、目的:在本地maven中配置nexus私服,可以:

  • 在本地项目下载第三方jar包时优先去nexus私服中下载
  • 项目组其他maven项目发布到nexus后,供其他人下载

2、方式:修改setting.xml文件,可以修改maven安装目录下conf中的该文件($MAVEN_HOME/conf/setting.xml),也可以修改用户目录下.m2目录的该文件,我选择修改后者,因为更换maven版本时不需要考虑配置文件的再次修改。

1)设置私服账号密码:servers标签增加如下内容

注意这里配置的server的id必须和pom文件中的distributionManagement对应仓库的id保持一致,maven在处理发布时会根据id查找用户名称和密码进行登录和文件的上传发布。

这里的ID值对应pom.xml的id=releases的仓库,也就是

    <server><id>releases</id>  <!--对应pom.xml的id=releases的仓库--><username>admin</username><password>admin123</password></server><server><id>snapshots</id> <!--对应pom.xml中id=snapshots的仓库--><username>admin</username><password>admin123</password></server><server><id>nexus-ma</id><username>admin</username><password>admin123</password></server>

2)为仓库列表配置的下载镜像列表<mirrors>标签下增加下面内容

     <!--为仓库列表配置的下载镜像列表。  --><mirror><!--该镜像的唯一标识符。id用来区分不同的mirror元素。  --><id>nexus-ma</id><name>internal nexus repository</name><!--镜像采用配置好的组的地址--><!--该镜像的URL。构建系统会优先考虑使用该URL,而非使用默认的服务器URL。  --><url>http://10.20.30.158:8081/repository/maven-public/</url><!--此处配置所有的构建均从私有仓库中下载 *代表所有,也可以写central --><mirrorOf>*</mirrorOf></mirror>

3)配置远程发布的私服<profiles>标签中增加下面内容

    <profile><id>nexus-pr</id><!--远程仓库列表,它是Maven用来填充构建系统本地仓库所使用的一组远程项目。  --><repositories><!--发布版本仓库--><repository><id>nexus-ma</id><name>Nexus Central</name><!--地址是nexus中repository(Releases/Snapshots)中对应的地址--<!-- 虚拟的URL形式,指向镜像的URL--><url>http://10.20.30.158:8081/repository/maven-public/</url><layout>default</layout><!-- 表示可以从这个仓库下载releases版本的构件-->  <releases><enabled>true</enabled></releases><!-- 表示可以从这个仓库下载snapshot版本的构件 -->  <snapshots><enabled>true</enabled></snapshots></repository></repositories><!-- 插件仓库列表 --><pluginRepositories><pluginRepository><id>nexus-ma</id><name>Nexus Central</name><url>http://10.20.30.158:8081/repository/maven-public/</url><layout>default</layout><snapshots><enabled>true</enabled></snapshots><releases><enabled>true</enabled></releases></pluginRepository></pluginRepositories></profile>

4)激活 <profile>中的ID使之生效

  <activeProfiles><!--需要激活 <profile>中的ID才生效-->  <activeProfile>nexus-pr</activeProfile></activeProfiles>

3.2 项目中配置私服

1、目的

项目通过执行maven的deploy任务可以将release或者snapshot版本发布到nexus上

2、方式

pom.xml中添加:

<distributionManagement><repository><!--id的名字可以任意取,但是在setting文件中的属性<server>的ID与这里一致--><id>releases</id><!--指向仓库类型为host(宿主仓库)的储存类型为Release的仓库--><url>http://10.20.30.158:8081/repository/maven-releases/</url></repository><snapshotRepository><id>snapshots</id><!--指向仓库类型为host(宿主仓库)的储存类型为Snapshot的仓库--><url>http://10.20.30.158:8081/repository/maven-snapshots/</url></snapshotRepository></distributionManagement>
</project>

其中maven-releases与maven-snapshots区别,是体现在创建仓库时【version pollcy版本策略】属性的设置上:

工程中通过pom.xml中version的内容(版本号中-SNAPSHOT部分)来决定deploy时发布到哪个库中

3.3 Maven deploy详解

1、maven中的仓库分为两种

  • snapshot快照仓库:snapshot快照仓库用于保存开发过程中的不稳定版本,
  • release发布仓库:release正式仓库则是用来保存稳定的发行版本。

定义一个maven项目(project或者模块)为快照版本,只需要在pom文件中在该模块的version版本号后加上-SNAPSHOT即可(注意这里必须是大写),如下:

<version>1.0-SNAPSHOT</version>

如果带有“-SNAPSHOTS”  打包快照版本,否则即为线上版本,约定俗成的命名,如下:

<version>1.0-RELEASE</version>

maven会根据模块的版本号(pom文件中的version)中是否带有-SNAPSHOT来判断是快照版本还是正式版本。

  • 如果是快照版本,那么在mvn deploy时会自动发布到快照版本库中,使用快照版本的模块,在不更改版本号的情况下,直接编译打包时,maven【会自动从镜像服务器上下载最新的快照版本】
  • 如果是正式发布版本,那么在mvn deploy时会自动发布到正式版本库中,而使用正式版本的模块,在不更改版本号的情况下,编译打包时如果本地已经存在该版本的模块则不会主动去镜像服务器上下载

所以,最佳实践:我们在开发阶段,可以将公用库的版本设置为【快照版本】,而被依赖组件则引用快照版本进行开发,在公用库的快照版本更新后,我们也不需要修改pom文件提示版本号来下载新的版本,直接mvn执行相关编译、打包命令即可重新下载最新的快照库了,从而也方便了我们进行开发。

 如果是快照版本,那么在mvn deploy时会自动发布到快照版本库中,而使用快照版本的模块,在不更改版本号的情况下,直接编译打包时,maven会自动从镜像服务器上下载最新的快照版本。

        SNAPSHOT是不稳定版,可能是还在开发中的版本,在开发时用户A可能每天都会更新代码,可能会频繁的发布版本。而另一组用户B需要实时得到A的最新代码版本,以进行同步开发。如果使用RELEASE仓库需要不停的更换坐标,才能升级到最新版本。而SNAPSHOT仓库则不需要这样做,用户A和用户B都不用升级版本。用户A每次发布时会根据当时时间创建一个新的快照版本,之前的快照版本也会保留成为历史版本。用户B每次构建项目时会自动根据版本时间加载最新的JAR包,这种模式更加适合于多模块同步开发测试阶段

       如果是正式发布版本,那么在mvn deploy时会自动发布到正式版本库中,而使用正式版本的模块,在不更改版本号的情况下,编译打包时如果本地已经存在该版本的模块则不会主动去镜像服务器上下载。

      所以,我们在开发阶段,可以将公用库的版本设置为快照版本,而被依赖组件则引用快照版本进行开发,在公用库的快照版本更新后,我们也不需要修改pom文件提示版本号来下载新的版本,直接mvn执行相关编译、打包命令即可重新下载最新的快照库了,从而也方便了我们进行开发。

       用户A将代码打包发布到RELEASE仓库,具体操作参考上篇文章。用户B使用时,需要在pom.xml添加JAR包的依赖坐标。如果用户A将版本从1.0升级为2.0,用户B使用时也需要同时在pom.xml中修改坐标版本。但是RELEASE是稳定版本,是经过测试以后才会发布的,通常不会频繁的升级版本

4.4 完整的pom.xml示例

<?xml version="1.0" encoding="UTF-8"?><!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
--><!--| This is the configuration file for Maven. It can be specified at two levels:||  1. User Level. This settings.xml file provides configuration for a single user,|                 and is normally provided in ${user.home}/.m2/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -s /path/to/user/settings.xml||  2. Global Level. This settings.xml file provides configuration for all Maven|                 users on a machine (assuming they're all using the same Maven|                 installation). It's normally provided in|                 ${maven.conf}/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -gs /path/to/global/settings.xml|| The sections in this sample file are intended to give you a running start at| getting the most out of your Maven installation. Where appropriate, the default| values (values used when the setting is not specified) are provided.||-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><!-- localRepository| The path to the local repository maven will use to store artifacts.|| Default: ${user.home}/.m2/repository<localRepository>/path/to/local/repo</localRepository>-->
<localRepository>D:\06.tools\maven-repository</localRepository><!-- interactiveMode| This will determine whether maven prompts you when it needs input. If set to false,| maven will use a sensible default value, perhaps based on some other setting, for| the parameter in question.|| Default: true<interactiveMode>true</interactiveMode>--><!-- offline| Determines whether maven should attempt to connect to the network when executing a build.| This will have an effect on artifact downloads, artifact deployment, and others.|| Default: false<offline>false</offline>--><!-- pluginGroups| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.|--><pluginGroups><!-- pluginGroup| Specifies a further group identifier to use for plugin lookup.<pluginGroup>com.your.plugins</pluginGroup>--></pluginGroups><!-- proxies| This is a list of proxies which can be used on this machine to connect to the network.| Unless otherwise specified (by system property or command-line switch), the first proxy| specification in this list marked as active will be used.|--><proxies><!-- proxy| Specification for one proxy, to be used in connecting to the network.|<proxy><id>optional</id><active>true</active><protocol>http</protocol><username>proxyuser</username><password>proxypass</password><host>proxy.host.net</host><port>80</port><nonProxyHosts>local.net|some.host.com</nonProxyHosts></proxy>--></proxies><!-- servers| This is a list of authentication profiles, keyed by the server-id used within the system.| Authentication profiles can be used whenever maven must make a connection to a remote server.|--><servers><!-- server| Specifies the authentication information to use when connecting to a particular server, identified by| a unique name within the system (referred to by the 'id' attribute below).|| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are|       used together.|<server><id>deploymentRepo</id><username>repouser</username><password>repopwd</password></server>--><!-- Another sample, using keys to authenticate.<server><id>siteServer</id><privateKey>/path/to/private/key</privateKey><passphrase>optional; leave empty if not used.</passphrase></server>--><server><id>releases</id>  <!--对应pom.xml的id=releases的仓库--><username>admin</username><password>admin123</password></server><server><id>snapshots</id> <!--对应pom.xml中id=snapshots的仓库--><username>admin</username><password>admin123</password></server><server><id>nexus-ma</id><username>admin</username><password>admin123</password></server></servers><!-- mirrors| This is a list of mirrors to be used in downloading artifacts from remote repositories.|| It works like this: a POM may declare a repository to use in resolving certain artifacts.| However, this repository may have problems with heavy traffic at times, so people have mirrored| it to several places.|| That repository definition will have a unique id, so we can create a mirror reference for that| repository, to be used as an alternate download site. The mirror site will be the preferred| server for that repository.|--><mirrors><!-- mirror| Specifies a repository mirror site to use instead of a given repository. The repository that| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|<mirror><id>mirrorId</id><mirrorOf>repositoryId</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://my.repository.com/repo/path</url></mirror>--><mirror><id>nexus-ma</id><name>internal nexus repository</name><!--镜像采用配置好的组的地址--><url>http://10.20.30.158:8081/repository/maven-public/</url><mirrorOf>*</mirrorOf></mirror>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror></mirrors><!-- profiles| This is a list of profiles which can be activated in a variety of ways, and which can modify| the build process. Profiles provided in the settings.xml are intended to provide local machine-| specific paths and repository locations which allow the build to work in the local environment.|| For example, if you have an integration testing plugin - like cactus - that needs to know where| your Tomcat instance is installed, you can provide a variable here such that the variable is| dereferenced during the build process to configure the cactus plugin.|| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles| section of this document (settings.xml) - will be discussed later. Another way essentially| relies on the detection of a system property, either matching a particular value for the property,| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.| Finally, the list of active profiles can be specified directly from the command line.|| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact|       repositories, plugin repositories, and free-form properties to be used as configuration|       variables for plugins in the POM.||--><profiles><!-- profile| Specifies a set of introductions to the build process, to be activated using one or more of the| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>| or the command line, profiles have to have an ID that is unique.|| An encouraged best practice for profile identification is to use a consistent naming convention| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.| This will make it more intuitive to understand what the set of introduced profiles is attempting| to accomplish, particularly when you only have a list of profile id's for debug.|| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.<profile><id>jdk-1.4</id><activation><jdk>1.4</jdk></activation><repositories><repository><id>jdk14</id><name>Repository for JDK 1.4 builds</name><url>http://www.myhost.com/maven/jdk14</url><layout>default</layout><snapshotPolicy>always</snapshotPolicy></repository></repositories></profile>--><!--| Here is another profile, activated by the system property 'target-env' with a value of 'dev',| which provides a specific path to the Tomcat instance. To use this, your plugin configuration| might hypothetically look like:|| ...| <plugin>|   <groupId>org.myco.myplugins</groupId>|   <artifactId>myplugin</artifactId>||   <configuration>|     <tomcatLocation>${tomcatPath}</tomcatLocation>|   </configuration>| </plugin>| ...|| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to|       anything, you could just leave off the <value/> inside the activation-property.|<profile><id>env-dev</id><activation><property><name>target-env</name><value>dev</value></property></activation><properties><tomcatPath>/path/to/tomcat/instance</tomcatPath></properties></profile>--><profile><!--ID用来确定该profile的唯一标识--><id>jdk-1.8</id><activation><activeByDefault>true</activeByDefault><jdk>1.8</jdk></activation><properties><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion></properties></profile><profile><id>nexus-pr</id><!-- 远程仓库列表 --><repositories><repository><id>nexus-ma</id><name>Nexus Central</name><!-- 虚拟的URL形式,指向镜像的URL--><url>http://10.20.30.158:8081/repository/maven-public/</url><layout>default</layout><!-- 表示可以从这个仓库下载releases版本的构件-->  <releases><enabled>true</enabled></releases><!-- 表示可以从这个仓库下载snapshot版本的构件 -->  <snapshots><enabled>true</enabled></snapshots></repository></repositories><!-- 插件仓库列表 --><pluginRepositories><pluginRepository><id>nexus-ma</id><name>Nexus Central</name><url>http://10.20.30.158:8081/repository/maven-public/</url><layout>default</layout><snapshots><enabled>true</enabled></snapshots><releases><enabled>true</enabled></releases></pluginRepository></pluginRepositories></profile></profiles><activeProfiles><!--需要激活 <profile>中的ID才生效-->  <activeProfile>nexus-pr</activeProfile><activeProfile>jdk-1.8</activeProfile></activeProfiles><!-- activeProfiles| List of profiles that are active for all builds.|<activeProfiles><activeProfile>alwaysActiveProfile</activeProfile><activeProfile>anotherAlwaysActiveProfile</activeProfile></activeProfiles>--></settings>

 

五、常见问题

1、登录时,默认密码提示超时处理方式

问题现象

Incorrect username or password, or no permission (Nexus3 登陆密码不为 admin123 、重置登陆密码)

问题分析及处理

后来注意到在登陆时有提示信息 ,密码保存在 /nexus-data下的 admin.password 中

找到admin.password ,查看并复制密码登录即可,然后登录后会提示修改密码:

注意密码只有这一部分:cb424ffc-fc4b-41c1-9cbf-d7ea26efd978,紧跟后面的 bash-4.2$ 不是密码内容

2、为Nexus配置阿里云代理仓库

问题现象

Nexus默认远程仓库为maven的中央仓库,https://repo1.maven.org/maven2/,国内访问慢导致下载很慢

问题分析及处理

方式1:直接修改nexus自带的maven-centra代理库url为:http://maven.aliyun.com/nexus/content/groups/public

方式二:添加阿里云代理仓库将其加入maven-public并设置顺序在maven-central代理库前面

1)添加代理仓库,create repository  ->  maven2 proxy

填写:设置仓库名称,仓库地址,仓库存储的位置(default就行)

name:nexus-aliyun

remote storage:http://maven.aliyun.com/nexus/content/groups/public

把nexus-aliyun添加到仓库组中,记得把nexus-aliyun排在maven-central代理库上边。

这样,就可以优先访问阿里云仓库了。

六、参考

1)安装配置运行
https://www.cnblogs.com/breeze-zZ/p/11049743.html

2)发布项目到私服
https://www.cnblogs.com/lenovo_tiger_love/p/10309782.html

3)maven的pom.xml配置详解(也有在linux安装nexus过程)
https://blog.csdn.net/luoww1/article/details/87718932?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-7

4)登录时,默认密码提示超时处理方式
https://cloud.tencent.com/developer/article/1478468

5)为Nexus配置阿里云代理仓库
https://www.cnblogs.com/godwithus/p/8955824.html

这篇关于nexus3下载安装配置运行的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



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

相关文章

mysqld_multi在Linux服务器上运行多个MySQL实例

《mysqld_multi在Linux服务器上运行多个MySQL实例》在Linux系统上使用mysqld_multi来启动和管理多个MySQL实例是一种常见的做法,这种方式允许你在同一台机器上运行多个... 目录1. 安装mysql2. 配置文件示例配置文件3. 创建数据目录4. 启动和管理实例启动所有实例

IDEA运行spring项目时,控制台未出现的解决方案

《IDEA运行spring项目时,控制台未出现的解决方案》文章总结了在使用IDEA运行代码时,控制台未出现的问题和解决方案,问题可能是由于点击图标或重启IDEA后控制台仍未显示,解决方案提供了解决方法... 目录问题分析解决方案总结问题js使用IDEA,点击运行按钮,运行结束,但控制台未出现http://

解决Spring运行时报错:Consider defining a bean of type ‘xxx.xxx.xxx.Xxx‘ in your configuration

《解决Spring运行时报错:Considerdefiningabeanoftype‘xxx.xxx.xxx.Xxx‘inyourconfiguration》该文章主要讲述了在使用S... 目录问题分析解决方案总结问题Description:Parameter 0 of constructor in x

解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题

《解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题》文章详细描述了在使用lombok的@Data注解标注实体类时遇到编译无误但运行时报错的问题,分析... 目录问题分析问题解决方案步骤一步骤二步骤三总结问题使用lombok注解@Data标注实体类,编译时

电脑没有仿宋GB2312字体怎么办? 仿宋GB2312字体下载安装及调出来的教程

《电脑没有仿宋GB2312字体怎么办?仿宋GB2312字体下载安装及调出来的教程》仿宋字体gb2312作为一种经典且常用的字体,广泛应用于各种场合,如何在计算机中调出仿宋字体gb2312?本文将为您... 仿宋_GB2312是公文标准字体之一,仿China编程宋是字体名称,GB2312是字php符编码标准名称(简

VScode连接远程Linux服务器环境配置图文教程

《VScode连接远程Linux服务器环境配置图文教程》:本文主要介绍如何安装和配置VSCode,包括安装步骤、环境配置(如汉化包、远程SSH连接)、语言包安装(如C/C++插件)等,文中给出了详... 目录一、安装vscode二、环境配置1.中文汉化包2.安装remote-ssh,用于远程连接2.1安装2

Redis多种内存淘汰策略及配置技巧分享

《Redis多种内存淘汰策略及配置技巧分享》本文介绍了Redis内存满时的淘汰机制,包括内存淘汰机制的概念,Redis提供的8种淘汰策略(如noeviction、volatile-lru等)及其适用场... 目录前言一、什么是 Redis 的内存淘汰机制?二、Redis 内存淘汰策略1. pythonnoe

windos server2022的配置故障转移服务的图文教程

《windosserver2022的配置故障转移服务的图文教程》本文主要介绍了windosserver2022的配置故障转移服务的图文教程,以确保服务和应用程序的连续性和可用性,文中通过图文介绍的非... 目录准备环境:步骤故障转移群集是 Windows Server 2022 中提供的一种功能,用于在多个

windos server2022里的DFS配置的实现

《windosserver2022里的DFS配置的实现》DFS是WindowsServer操作系统提供的一种功能,用于在多台服务器上集中管理共享文件夹和文件的分布式存储解决方案,本文就来介绍一下wi... 目录什么是DFS?优势:应用场景:DFS配置步骤什么是DFS?DFS指的是分布式文件系统(Distr

关于Maven中pom.xml文件配置详解

《关于Maven中pom.xml文件配置详解》pom.xml是Maven项目的核心配置文件,它描述了项目的结构、依赖关系、构建配置等信息,通过合理配置pom.xml,可以提高项目的可维护性和构建效率... 目录1. POM文件的基本结构1.1 项目基本信息2. 项目属性2.1 引用属性3. 项目依赖4. 构