通过启动过程启动的脚本在90%的时间内都可以工作-当它“失败”时,它就变成僵尸并且不执行第一行代码

如何解决通过启动过程启动的脚本在90%的时间内都可以工作-当它“失败”时,它就变成僵尸并且不执行第一行代码

(已解决)

任务计划程序将启动powershell作业(没有人登录,该任务已保存用户),然后通过Start-Process从Powershell启动CMD文件,并且该命令文件在具有正确参数的另一个脚本上成功启动了powershell。但是,该ps1脚本似乎仅在90%的时间内运行。其余的10%甚至不执行第一行。我很困惑,所以这里是基础知识以及在Windows日志中可以看到的内容...

$DailyDir      = "\\MACHINE-NAME\PathToStuff\Daily"
$BatchDir      = "$DailyDir\BatchFiles"
$MobileMonCMD  = "$BatchDir\MobileMonitor.cmd"
$currentHour   = Get-Date -Format "HH"
$BackGroundPID = (Start-Process -FilePath $MobileMonCMD -ArgumentList $currentHour -WindowStyle Hidden -WorkingDirectory $BatchDir -PassThru).Id

我已经验证了cmd即使在“失败”下也可以运行。它出现在Windows事件查看器中,我可以看到它创建了对要在后台运行的Powershell脚本的调用。 CMD文件的内容为:

@ECHO OFF
powershell "& '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' %1"

MobileMonitor.ps1中的第一行代码是:

Start-Transcript -OutputDirectory "C:\Projects\Logs\MobileMonitor"

脚本成功后,我会获得完整的成绩单。如果不是,则什么也不会产生。

奇怪的部分是该运行仍在运行的powershell进程(我可以通过跟踪Windows事件来确定其分配的PID)。

下面,我包括了“审计”事件,该事件显示了上午11点启动的所有事件..看上去都很不错,除了从未执行过的“开始记录”。同样,这在90%的时间内效果很好。我得到一个不错的成绩单文件。但是其他10%的人让我感到难过。

获取\\ MACHINE-NAME \ PathToStuff \ etc文件是否有问题?就像它无法拉出文件一样,它决定作为僵尸powershell进程坐下来,什么都不做?

任何建议表示赞赏。附带一提,我从该位置运行了许多脚本。这是唯一抱怨的人(也是唯一从Start-Process启动的人)。

以下是窗口审核事件,该事件显示了上午11点一直到引擎可用的所有事件:

Log Name:      Windows PowerShell
Source:        PowerShell
Date:          8/11/2020 11:34:15 AM
Event ID:      400
Task Category: Engine Lifecycle
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      Machine.Domain.com
Description:
Engine state is changed from None to Available. 

Details: 
    NewEngineState=Available
    PreviousEngineState=None

    SequenceNumber=13

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell & '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=5.1.14393.3471
    RunspaceId=1eee2a6e-95f9-40be-ac2d-707c2d0afe44
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PowerShell" />
    <EventID Qualifiers="0">400</EventID>
    <Level>4</Level>
    <Task>4</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.442775300Z" />
    <EventRecordID>62810</EventRecordID>
    <Channel>Windows PowerShell</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Available</Data>
    <Data>None</Data>
    <Data>  NewEngineState=Available
    PreviousEngineState=None

    SequenceNumber=13

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell &amp; '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=5.1.14393.3471
    RunspaceId=1eee2a6e-95f9-40be-ac2d-707c2d0afe44
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=</Data>
  </EventData>
</Event>

Log Name:      Windows PowerShell
Source:        PowerShell
Date:          8/11/2020 11:34:15 AM
Event ID:      600
Task Category: Provider Lifecycle
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      Machine.Domain.com
Description:
Provider "Variable" is Started. 

Details: 
    ProviderName=Variable
    NewProviderState=Started

    SequenceNumber=11

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell & '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PowerShell" />
    <EventID Qualifiers="0">600</EventID>
    <Level>4</Level>
    <Task>6</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.442775300Z" />
    <EventRecordID>62809</EventRecordID>
    <Channel>Windows PowerShell</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Variable</Data>
    <Data>Started</Data>
    <Data>  ProviderName=Variable
    NewProviderState=Started

    SequenceNumber=11

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell &amp; '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=</Data>
  </EventData>
</Event>

Log Name:      Windows PowerShell
Source:        PowerShell
Date:          8/11/2020 11:34:15 AM
Event ID:      600
Task Category: Provider Lifecycle
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      Machine.Domain.com
Description:
Provider "Function" is Started. 

Details: 
    ProviderName=Function
    NewProviderState=Started

    SequenceNumber=9

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell & '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PowerShell" />
    <EventID Qualifiers="0">600</EventID>
    <Level>4</Level>
    <Task>6</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.427147700Z" />
    <EventRecordID>62808</EventRecordID>
    <Channel>Windows PowerShell</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Function</Data>
    <Data>Started</Data>
    <Data>  ProviderName=Function
    NewProviderState=Started

    SequenceNumber=9

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell &amp; '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=</Data>
  </EventData>
</Event>

Log Name:      Windows PowerShell
Source:        PowerShell
Date:          8/11/2020 11:34:15 AM
Event ID:      600
Task Category: Provider Lifecycle
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      Machine.Domain.com
Description:
Provider "FileSystem" is Started. 

Details: 
    ProviderName=FileSystem
    NewProviderState=Started

    SequenceNumber=7

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell & '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PowerShell" />
    <EventID Qualifiers="0">600</EventID>
    <Level>4</Level>
    <Task>6</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.427147700Z" />
    <EventRecordID>62807</EventRecordID>
    <Channel>Windows PowerShell</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>FileSystem</Data>
    <Data>Started</Data>
    <Data>  ProviderName=FileSystem
    NewProviderState=Started

    SequenceNumber=7

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell &amp; '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=</Data>
  </EventData>
</Event>

Log Name:      Windows PowerShell
Source:        PowerShell
Date:          8/11/2020 11:34:15 AM
Event ID:      600
Task Category: Provider Lifecycle
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      Machine.Domain.com
Description:
Provider "Environment" is Started. 

Details: 
    ProviderName=Environment
    NewProviderState=Started

    SequenceNumber=5

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell & '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PowerShell" />
    <EventID Qualifiers="0">600</EventID>
    <Level>4</Level>
    <Task>6</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.427147700Z" />
    <EventRecordID>62806</EventRecordID>
    <Channel>Windows PowerShell</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Environment</Data>
    <Data>Started</Data>
    <Data>  ProviderName=Environment
    NewProviderState=Started

    SequenceNumber=5

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell &amp; '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=</Data>
  </EventData>
</Event>

Log Name:      Windows PowerShell
Source:        PowerShell
Date:          8/11/2020 11:34:15 AM
Event ID:      600
Task Category: Provider Lifecycle
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      Machine.Domain.com
Description:
Provider "Alias" is Started. 

Details: 
    ProviderName=Alias
    NewProviderState=Started

    SequenceNumber=3

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell & '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PowerShell" />
    <EventID Qualifiers="0">600</EventID>
    <Level>4</Level>
    <Task>6</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.427147700Z" />
    <EventRecordID>62805</EventRecordID>
    <Channel>Windows PowerShell</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Alias</Data>
    <Data>Started</Data>
    <Data>  ProviderName=Alias
    NewProviderState=Started

    SequenceNumber=3

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell &amp; '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=</Data>
  </EventData>
</Event>

Log Name:      Windows PowerShell
Source:        PowerShell
Date:          8/11/2020 11:34:15 AM
Event ID:      600
Task Category: Provider Lifecycle
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      Machine.Domain.com
Description:
Provider "Registry" is Started. 

Details: 
    ProviderName=Registry
    NewProviderState=Started

    SequenceNumber=1

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell & '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PowerShell" />
    <EventID Qualifiers="0">600</EventID>
    <Level>4</Level>
    <Task>6</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.427147700Z" />
    <EventRecordID>62804</EventRecordID>
    <Channel>Windows PowerShell</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Registry</Data>
    <Data>Started</Data>
    <Data>  ProviderName=Registry
    NewProviderState=Started

    SequenceNumber=1

    HostName=ConsoleHost
    HostVersion=5.1.14393.3471
    HostId=2d2852c6-19d0-46c4-bca8-d8528b46eb96
    HostApplication=powershell &amp; '\\MACHINE-NAME\PathToStuff\Daily\BatchFiles\MobileMonitor.ps1' 11
    EngineVersion=
    RunspaceId=
    PipelineId=
    CommandName=
    CommandType=
    ScriptName=
    CommandPath=
    CommandLine=</Data>
  </EventData>
</Event>
Log Name:      Security
Source:        Microsoft-Windows-Security-Auditing
Date:          8/11/2020 11:34:15 AM
Event ID:      4688
Task Category: Process Creation
Level:         Information
Keywords:      Audit Success
User:          N/A
Computer:      Machine.Domain.com
Description:
A new process has been created.

Creator Subject:
    Security ID:        DOMAIN\Admin-User
    Account Name:       Admin-User
    Account Domain:     DOMAIN
    Logon ID:       0x1B20BED0

Target Subject:
    Security ID:        NULL SID
    Acco## Heading ##unt Name:      -
    Account Domain:     -
    Logon ID:       0x0

Process Information:
    New Process ID:     0x1e90
    New Process Name:   C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Token Elevation Type:   %%1936
    Mandatory Label:        Mandatory Label\High Mandatory Level
    Creator Process ID: 0x1c28
    Creator Process Name:   C:\Windows\System32\cmd.exe
    Process Command Line:   

Token Elevation Type indicates the type of token that was assigned to the new process in accordance with User Account Control policy.

Type 1 is a full token with no privileges removed or groups disabled.  A full token is only used if User Account Control is disabled or if the user is the built-in Administrator account or a service account.

Type 2 is an elevated token with no privileges removed or groups disabled.  An elevated token is used when User Account Control is enabled and the user chooses to start the program using Run as administrator.  An elevated token is also used when an application is configured to always require administrative privilege or to always require maximum privilege,and the user is a member of the Administrators group.

Type 3 is a limited token with administrative privileges removed and administrative groups disabled.  The limited token is used when User Account Control is enabled,the application does not require administrative privilege,and the user does not choose to start the program using Run as administrator.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" />
    <EventID>4688</EventID>
    <Version>2</Version>
    <Level>0</Level>
    <Task>13312</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2020-08-11T15:34:15.011474000Z" />
    <EventRecordID>20585449</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="4796" />
    <Channel>Security</Channel>
    <Computer>Machine.Domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-5-21-1067277609-22629781-1543857936-67791</Data>
    <Data Name="SubjectUserName">Admin-User</Data>
    <Data Name="SubjectDomainName">DOMAIN</Data>
    <Data Name="SubjectLogonId">0x1b20bed0</Data>
    <Data Name="NewProcessId">0x1e90</Data>
    <Data Name="NewProcessName">C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</Data>
    <Data Name="TokenElevationType">%%1936</Data>
    <Data Name="ProcessId">0x1c28</Data>
    <Data Name="CommandLine">
    </Data>
    <Data Name="TargetUserSid">S-1-0-0</Data>
    <Data Name="TargetUserName">-</Data>
    <Data Name="TargetDomainName">-</Data>
    <Data Name="TargetLogonId">0x0</Data>
    <Data Name="ParentProcessName">C:\Windows\System32\cmd.exe</Data>
    <Data Name="MandatoryLabel">S-1-16-12288</Data>
  </EventData>
</Event>

解决方法

一个Windows极客朋友建议我可能有竞争状况,因为此状况是在没有人登录的服务器上运行的,因此对新的后台Powershell进程的调用必须建立其环境。他认为它可能无法及时访问\\ MACHINE-NAME \ PathToFiles \ ps1Script区域。

为了测试这一点,我将代码移至服务器上的C驱动器,现在它可以100%地工作。我生活在\\ NO-MACHINE位置上的所有其他作业都可以通过任务计划程序正常运行,但这是从启动进程启动的唯一作业。如果有人可以向我解释启动过程有什么问题,或者允许启动过程具有一个完整的网络启用环境来调用脚本的方法,那么我很乐意将代码放回原处。

现在,我很高兴这个问题已经解决,但是将代码保存在服务器上而不是集中式存储库将使我无休止。 ;)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-