BulePrism进阶教程-13. Further Application Types

本文介绍了BluePrism如何与主框架、Java应用交互,并概述了表面自动化技术的应用场景及MatchIndex、MatchReverse属性的作用。

Blue Prism is capable of interfacing with other application types, but so far we have only looked at the default option of Windows based and Browser based applications.
This section provides an overview to mainframe and Java applications. Separate datasheets are available on the Blue Prism Portal that provides more detail. In addition this section describes Surface Automation that can be when elements aren’t accessible to Application Modeler.
13.1. Mainframe Applications

Figure 180: Application Modeler Application Types
Blue Prism is also able to interface with mainframe applications (sometimes known as green screen systems) and the Application Modeler wizard is used to specify the initial details.
 Application type.
 Session file path.
 Session identifier.

Figure 181: Mainframe Applications

Figure 182: Hummingbird Mainframe Application
Mainframe applications are spied by identifying rectangular areas of the screen. Application Modeler does this by superimposing a grid onto the application to make the rows and columns of the screen visible. One unit of the grid represents one character space on the screen.

Figure 183: The Mainframe Grid
The operation to capture mainframe elements is slightly different to spying other applications. First, the grid must be created by holding “CTRL” and clicking on the application. With the grid in place, the mouse is used to drag and select rectangular areas. These areas can then be captured in Application Modeler using the mouse menu.

Figure 184: A Mainframe Region Highlighted in Blue
Mainframe elements are simpler than those from other application types and there are far fewer attributes to deal with in Application Modeler.

Figure 185: Mainframe Element Attributes
13.2. Java Applications
Blue Prism is also able to interface with Java applications, and creating a Java based Business Object is near identical to making a Windows-based Business Object.
You should find the procedure for spying elements and employing them in the Business Object is very familiar to you by now.
Ancestor Count
The Ancestor Count attribute is a very useful attribute for limiting the search that Blue Prism has to perform in order to identify your element.
Picturing the target application as a tree of elements (in which, for example, a table cell is the child of a table, which in turn is the child of a frame, which in turn is the child of a top-level window) the Ancestor Count attribute records how deep in the tree the element is found.
By matching on Ancestor Count, you can instruct Blue Prism to only search a subset of the tree, thereby improving performance. When you experience slow performance in a Java application, this should be the first attribute you experiment with.
The Match Index and Match Reverse attributes (described below) may also be used to improve the performance of a Java interface.
For some elements and environments, Blue Prism technology connectors (Windows/Java/HTML etc.) can’t be used. Examples of this are where applications are presented in a virtualized state (i.e., via a Citrix server), and some bespoke application controls.
Blue Prism provides Surface Automation techniques that can be used as an alternative when technology connectors are not available. Some of these Surface Automation techniques are briefly described in the following Regions, Character Matching, and Global Clicks and Keys sections.
A detailed Surface Automation training course is available, separate to this Foundation course. This additional training course is recommended to anyone needing to use these techniques in their environment.
13.3. Match Index and Match Reverse
Match Index and Match Reverse
When identifying an application element using Application Modeler, you will notice that there are two attributes available named Match Index and Match Reverse. These attributes are available for all application types.
Match Index and Match Reverse are not attributes of the identified element, but instead are controllers of how Blue Prism will search for the element at run time.
When Match Index is set, Blue Prism will stop searching once an element has been found, instead of continuing to search for potential duplicates. Using this attribute may significantly increase the search speed (especially when using the Java and Accessibility interfaces) but should only be used in circumstances where duplicate elements are either unlikely or can be ignored.
When using Match Index, Match Reverse will make Blue Prism search in a bottom-up order rather than the default top-down order. Again, this may improve the search speed but only experimentation will tell.

Figure 186: Match Index and Match Reverse Attributes
The match index value can be changed to any numeric value. For example, if set to 2, it will ignore the first element found that matches all the other selected attributes and find the second matching attribute instead if one exists.
This can be a very useful when identifying screen elements that are otherwise not unique. For example, in the earlier Object Studio exercises the Ordinal attribute was used to uniquely identify elements in the Order System application. If the Ordinal had not worked and elements were still not unique (returning multiple matches), Match Index could have been used instead.
13.4. Surface Automation
For some elements and environments, Blue Prism technology connectors (Windows/Java/HTML etc.) can’t be used. Examples of this are where applications are presented in a virtualized state (i.e., via a Citrix server), and some bespoke application controls.
Blue Prism provides Surface Automation techniques that can be used as an alternative when technology connectors are not available. Some of these Surface Automation techniques are briefly described in the following Regions, Character Matching, and Global Clicks and Keys sections.
A detailed Surface Automation training course is available, separate to this Foundation course. This additional training course is recommended to anyone needing to use these techniques in their environment.
Key Point
If Surface Automation techniques are required, additional training is required.
 

Microsoft Windows [版本 10.0.19045.6456] (c) Microsoft Corporation。保留所有权利。 C:\Users\Administrator>D:\test\spzx-manager\target\ 'D:\test\spzx-manager\target\' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 C:\Users\Administrator>cd /d "D:\新建文件夹 (4)\spzx-parent\spzx-manager\target" D:\新建文件夹 (4)\spzx-parent\spzx-manager\target>jar -tf spzx-manager-1.0-SNAPSHOT.jar | findstr BOOT-INF BOOT-INF/ BOOT-INF/classes/ BOOT-INF/classes/com/ BOOT-INF/classes/com/atgui/ BOOT-INF/classes/com/atgui/spzx/ BOOT-INF/classes/com/atgui/spzx/manager/ BOOT-INF/classes/com/atgui/spzx/manager/config/ BOOT-INF/classes/com/atgui/spzx/manager/controller/ BOOT-INF/classes/com/atgui/spzx/manager/helper/ BOOT-INF/classes/com/atgui/spzx/manager/interceptor/ BOOT-INF/classes/com/atgui/spzx/manager/listener/ BOOT-INF/classes/com/atgui/spzx/manager/mapper/ BOOT-INF/classes/com/atgui/spzx/manager/properties/ BOOT-INF/classes/com/atgui/spzx/manager/service/ BOOT-INF/classes/com/atgui/spzx/manager/service/impl/ BOOT-INF/classes/com/atgui/spzx/manager/task/ BOOT-INF/classes/mapper/ BOOT-INF/classes/mapper/user/ BOOT-INF/classes/application-dev.yml.bak BOOT-INF/classes/application.yml BOOT-INF/classes/com/atgui/spzx/manager/config/WebMvcConfiguration.class BOOT-INF/classes/com/atgui/spzx/manager/controller/BrandController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/CategoryBrandController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/CategoryController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/FileUploadController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/IndexController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/OrderInfoController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/ProductController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/ProductSpecController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/ProductUnitController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/SysMenuController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/SysRoleController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/SysRoleMenuController.class BOOT-INF/classes/com/atgui/spzx/manager/controller/SysUserController.class BOOT-INF/classes/com/atgui/spzx/manager/helper/MenuHelper.class BOOT-INF/classes/com/atgui/spzx/manager/interceptor/LoginAuthInterceptor.class BOOT-INF/classes/com/atgui/spzx/manager/listener/ExcelListener.class BOOT-INF/classes/com/atgui/spzx/manager/ManagerApplication.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/BrandMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/CategoryBrandMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/CategoryMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/OrderInfoMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/OrderStatisticsMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/ProductDetailsMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/ProductMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/ProductSkuMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/ProductSpecMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/ProductUnitMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/SysMenuMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/SysOperLogMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/SysRoleMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/SysRoleMenuMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/SysRoleUserMapper.class BOOT-INF/classes/com/atgui/spzx/manager/mapper/SysUserMapper.class BOOT-INF/classes/com/atgui/spzx/manager/properties/MinioProperties.class BOOT-INF/classes/com/atgui/spzx/manager/properties/UserAuthProperties.class BOOT-INF/classes/com/atgui/spzx/manager/service/BrandService.class BOOT-INF/classes/com/atgui/spzx/manager/service/CategoryBrandService.class BOOT-INF/classes/com/atgui/spzx/manager/service/CategoryService.class BOOT-INF/classes/com/atgui/spzx/manager/service/FileUploadService.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/AsyncOperLogServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/BrandServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/CategoryBrandServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/CategoryServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/FileUploadServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/OrderInfoServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/ProductServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/ProductSpecServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/ProductUnitServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/SysMenuServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/SysRoleMenuServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/SysRoleServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/SysUserServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/impl/ValidateCodeServiceImpl.class BOOT-INF/classes/com/atgui/spzx/manager/service/OrderInfoService.class BOOT-INF/classes/com/atgui/spzx/manager/service/ProductService.class BOOT-INF/classes/com/atgui/spzx/manager/service/ProductSpecService.class BOOT-INF/classes/com/atgui/spzx/manager/service/ProductUnitService.class BOOT-INF/classes/com/atgui/spzx/manager/service/SysMenuService.class BOOT-INF/classes/com/atgui/spzx/manager/service/SysRoleMenuService.class BOOT-INF/classes/com/atgui/spzx/manager/service/SysRoleService.class BOOT-INF/classes/com/atgui/spzx/manager/service/SysUserService.class BOOT-INF/classes/com/atgui/spzx/manager/service/ValidateCodeService.class BOOT-INF/classes/com/atgui/spzx/manager/task/OrderStatisticsTask.class BOOT-INF/classes/logback-spring.xml BOOT-INF/classes/mapper/user/BrandMapper.xml BOOT-INF/classes/mapper/user/CategoryBrandMapper.xml BOOT-INF/classes/mapper/user/CategoryMapper.xml BOOT-INF/classes/mapper/user/OrderInfoMapper.xml BOOT-INF/classes/mapper/user/OrderStatisticsMapper.xml BOOT-INF/classes/mapper/user/ProductDetailsMapper.xml BOOT-INF/classes/mapper/user/ProductMapper.xml BOOT-INF/classes/mapper/user/ProductSkuMapper.xml BOOT-INF/classes/mapper/user/ProductSpecMapper.xml BOOT-INF/classes/mapper/user/ProductUnitMapper.xml BOOT-INF/classes/mapper/user/SysMenuMapper.xml BOOT-INF/classes/mapper/user/SysOperLogMapper.xml BOOT-INF/classes/mapper/user/SysRoleMapper.xml BOOT-INF/classes/mapper/user/SysRoleMenuMapper.xml BOOT-INF/classes/mapper/user/SysRoleUserMapper.xml BOOT-INF/classes/mapper/user/SysUserMapper.xml BOOT-INF/classes/mybatis-config.xml BOOT-INF/lib/ BOOT-INF/lib/spring-boot-3.0.5.jar BOOT-INF/lib/spring-boot-autoconfigure-3.0.5.jar BOOT-INF/lib/logback-classic-1.4.6.jar BOOT-INF/lib/logback-core-1.4.6.jar BOOT-INF/lib/log4j-to-slf4j-2.19.0.jar BOOT-INF/lib/log4j-api-2.19.0.jar BOOT-INF/lib/jul-to-slf4j-2.0.7.jar BOOT-INF/lib/snakeyaml-1.33.jar BOOT-INF/lib/jackson-databind-2.14.2.jar BOOT-INF/lib/jackson-annotations-2.14.2.jar BOOT-INF/lib/jackson-datatype-jdk8-2.14.2.jar BOOT-INF/lib/jackson-datatype-jsr310-2.14.2.jar BOOT-INF/lib/jackson-module-parameter-names-2.14.2.jar BOOT-INF/lib/tomcat-embed-core-10.1.7.jar BOOT-INF/lib/tomcat-embed-el-10.1.7.jar BOOT-INF/lib/tomcat-embed-websocket-10.1.7.jar BOOT-INF/lib/spring-web-6.0.7.jar BOOT-INF/lib/spring-beans-6.0.7.jar BOOT-INF/lib/micrometer-observation-1.10.5.jar BOOT-INF/lib/micrometer-commons-1.10.5.jar BOOT-INF/lib/spring-webmvc-6.0.7.jar BOOT-INF/lib/spring-aop-6.0.7.jar BOOT-INF/lib/spring-context-6.0.7.jar BOOT-INF/lib/spring-expression-6.0.7.jar BOOT-INF/lib/spring-data-redis-3.0.4.jar BOOT-INF/lib/spring-data-keyvalue-3.0.4.jar BOOT-INF/lib/spring-data-commons-3.0.4.jar BOOT-INF/lib/spring-tx-6.0.7.jar BOOT-INF/lib/spring-oxm-6.0.7.jar BOOT-INF/lib/spring-context-support-6.0.7.jar BOOT-INF/lib/lettuce-core-6.2.3.RELEASE.jar BOOT-INF/lib/netty-common-4.1.90.Final.jar BOOT-INF/lib/netty-handler-4.1.90.Final.jar BOOT-INF/lib/netty-resolver-4.1.90.Final.jar BOOT-INF/lib/netty-buffer-4.1.90.Final.jar BOOT-INF/lib/netty-transport-native-unix-common-4.1.90.Final.jar BOOT-INF/lib/netty-codec-4.1.90.Final.jar BOOT-INF/lib/netty-transport-4.1.90.Final.jar BOOT-INF/lib/reactor-core-3.5.4.jar BOOT-INF/lib/reactive-streams-1.0.4.jar BOOT-INF/lib/mybatis-spring-boot-starter-3.0.1.jar BOOT-INF/lib/HikariCP-5.0.1.jar BOOT-INF/lib/spring-jdbc-6.0.7.jar BOOT-INF/lib/mybatis-spring-boot-autoconfigure-3.0.1.jar BOOT-INF/lib/mybatis-3.5.11.jar BOOT-INF/lib/mybatis-spring-3.0.1.jar BOOT-INF/lib/mysql-connector-j-8.0.32.jar BOOT-INF/lib/common-service-1.0-SNAPSHOT.jar BOOT-INF/lib/common-util-1.0-SNAPSHOT.jar BOOT-INF/lib/fastjson-2.0.21.jar BOOT-INF/lib/fastjson2-extension-2.0.21.jar BOOT-INF/lib/fastjson2-2.0.21.jar BOOT-INF/lib/minio-8.5.2.jar BOOT-INF/lib/simple-xml-safe-2.7.1.jar BOOT-INF/lib/guava-30.1.1-jre.jar BOOT-INF/lib/failureaccess-1.0.1.jar BOOT-INF/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar BOOT-INF/lib/jsr305-3.0.2.jar BOOT-INF/lib/checker-qual-3.8.0.jar BOOT-INF/lib/error_prone_annotations-2.5.1.jar BOOT-INF/lib/j2objc-annotations-1.3.jar BOOT-INF/lib/okhttp-4.10.0.jar BOOT-INF/lib/okio-jvm-3.0.0.jar BOOT-INF/lib/kotlin-stdlib-jdk8-1.7.22.jar BOOT-INF/lib/kotlin-stdlib-jdk7-1.7.22.jar BOOT-INF/lib/kotlin-stdlib-common-1.7.22.jar BOOT-INF/lib/kotlin-stdlib-1.7.22.jar BOOT-INF/lib/annotations-13.0.jar BOOT-INF/lib/bcprov-jdk15on-1.69.jar BOOT-INF/lib/commons-compress-1.21.jar BOOT-INF/lib/snappy-java-1.1.8.4.jar BOOT-INF/lib/spzx-model-1.0-SNAPSHOT.jar BOOT-INF/lib/lombok-1.18.20.jar BOOT-INF/lib/knife4j-openapi3-jakarta-spring-boot-starter-4.1.0.jar BOOT-INF/lib/knife4j-core-4.1.0.jar BOOT-INF/lib/knife4j-openapi3-ui-4.1.0.jar BOOT-INF/lib/springdoc-openapi-starter-common-2.0.4.jar BOOT-INF/lib/swagger-core-jakarta-2.2.8.jar BOOT-INF/lib/commons-lang3-3.12.0.jar BOOT-INF/lib/jakarta.validation-api-3.0.2.jar BOOT-INF/lib/jackson-dataformat-yaml-2.14.2.jar BOOT-INF/lib/springdoc-openapi-starter-webflux-ui-2.0.4.jar BOOT-INF/lib/springdoc-openapi-starter-webflux-api-2.0.4.jar BOOT-INF/lib/spring-webflux-6.0.7.jar BOOT-INF/lib/swagger-ui-4.18.1.jar BOOT-INF/lib/webjars-locator-core-0.52.jar BOOT-INF/lib/classgraph-4.8.149.jar BOOT-INF/lib/springdoc-openapi-starter-webmvc-ui-2.0.4.jar BOOT-INF/lib/springdoc-openapi-starter-webmvc-api-2.0.4.jar BOOT-INF/lib/swagger-annotations-jakarta-2.2.8.jar BOOT-INF/lib/swagger-models-jakarta-2.2.8.jar BOOT-INF/lib/easyexcel-3.1.0.jar BOOT-INF/lib/easyexcel-core-3.1.0.jar BOOT-INF/lib/easyexcel-support-3.1.0.jar BOOT-INF/lib/poi-4.1.2.jar BOOT-INF/lib/commons-collections4-4.4.jar BOOT-INF/lib/commons-math3-3.6.1.jar BOOT-INF/lib/SparseBitSet-1.2.jar BOOT-INF/lib/poi-ooxml-4.1.2.jar BOOT-INF/lib/curvesapi-1.06.jar BOOT-INF/lib/poi-ooxml-schemas-4.1.2.jar BOOT-INF/lib/xmlbeans-3.1.0.jar BOOT-INF/lib/commons-csv-1.8.jar BOOT-INF/lib/ehcache-3.9.9.jar BOOT-INF/lib/byte-buddy-1.12.23.jar BOOT-INF/lib/hutool-all-5.5.2.jar BOOT-INF/lib/spring-boot-test-3.0.5.jar BOOT-INF/lib/spring-boot-test-autoconfigure-3.0.5.jar BOOT-INF/lib/json-path-2.7.0.jar BOOT-INF/lib/json-smart-2.4.10.jar BOOT-INF/lib/accessors-smart-2.4.9.jar BOOT-INF/lib/asm-9.3.jar BOOT-INF/lib/jakarta.xml.bind-api-4.0.0.jar BOOT-INF/lib/jakarta.activation-api-2.1.1.jar BOOT-INF/lib/assertj-core-3.23.1.jar BOOT-INF/lib/hamcrest-2.2.jar BOOT-INF/lib/junit-jupiter-5.9.2.jar BOOT-INF/lib/junit-jupiter-api-5.9.2.jar BOOT-INF/lib/opentest4j-1.2.0.jar BOOT-INF/lib/junit-platform-commons-1.9.2.jar BOOT-INF/lib/apiguardian-api-1.1.2.jar BOOT-INF/lib/junit-jupiter-params-5.9.2.jar BOOT-INF/lib/junit-jupiter-engine-5.9.2.jar BOOT-INF/lib/junit-platform-engine-1.9.2.jar BOOT-INF/lib/mockito-core-4.8.1.jar BOOT-INF/lib/byte-buddy-agent-1.12.23.jar BOOT-INF/lib/objenesis-3.2.jar BOOT-INF/lib/mockito-junit-jupiter-4.8.1.jar BOOT-INF/lib/jsonassert-1.5.1.jar BOOT-INF/lib/android-json-0.0.20131108.vaadin1.jar BOOT-INF/lib/spring-core-6.0.7.jar BOOT-INF/lib/spring-jcl-6.0.7.jar BOOT-INF/lib/spring-test-6.0.7.jar BOOT-INF/lib/xmlunit-core-2.9.1.jar BOOT-INF/lib/pagehelper-spring-boot-starter-1.4.3.jar BOOT-INF/lib/pagehelper-spring-boot-autoconfigure-1.4.3.jar BOOT-INF/lib/pagehelper-5.3.1.jar BOOT-INF/lib/jsqlparser-4.2.jar BOOT-INF/lib/common-log-1.0-SNAPSHOT.jar BOOT-INF/lib/aspectjweaver-1.9.19.jar BOOT-INF/lib/spring-cloud-starter-alibaba-nacos-discovery-2022.0.0.0-RC2.jar BOOT-INF/lib/spring-cloud-alibaba-commons-2022.0.0.0-RC2.jar BOOT-INF/lib/nacos-client-2.2.1.jar BOOT-INF/lib/nacos-auth-plugin-2.2.1.jar BOOT-INF/lib/nacos-encryption-plugin-2.2.1.jar BOOT-INF/lib/commons-codec-1.15.jar BOOT-INF/lib/jackson-core-2.14.2.jar BOOT-INF/lib/httpasyncclient-4.1.5.jar BOOT-INF/lib/httpcore-4.4.16.jar BOOT-INF/lib/httpcore-nio-4.4.16.jar BOOT-INF/lib/httpclient-4.5.14.jar BOOT-INF/lib/simpleclient-0.16.0.jar BOOT-INF/lib/simpleclient_tracer_otel-0.16.0.jar BOOT-INF/lib/simpleclient_tracer_common-0.16.0.jar BOOT-INF/lib/simpleclient_tracer_otel_agent-0.16.0.jar BOOT-INF/lib/spring-context-support-1.0.11.jar BOOT-INF/lib/spring-cloud-commons-4.0.2.jar BOOT-INF/lib/spring-security-crypto-6.0.2.jar BOOT-INF/lib/spring-cloud-context-4.0.2.jar BOOT-INF/lib/spring-cloud-starter-alibaba-sentinel-2022.0.0.0-RC2.jar BOOT-INF/lib/sentinel-transport-simple-http-1.8.6.jar BOOT-INF/lib/sentinel-transport-common-1.8.6.jar BOOT-INF/lib/sentinel-datasource-extension-1.8.6.jar BOOT-INF/lib/sentinel-annotation-aspectj-1.8.6.jar BOOT-INF/lib/sentinel-core-1.8.6.jar BOOT-INF/lib/spring-cloud-circuitbreaker-sentinel-2022.0.0.0-RC2.jar BOOT-INF/lib/sentinel-reactor-adapter-1.8.6.jar BOOT-INF/lib/sentinel-spring-webflux-adapter-1.8.6.jar BOOT-INF/lib/sentinel-spring-webmvc-6x-adapter-1.8.6.jar BOOT-INF/lib/sentinel-parameter-flow-control-1.8.6.jar BOOT-INF/lib/concurrentlinkedhashmap-lru-1.4.2.jar BOOT-INF/lib/sentinel-cluster-server-default-1.8.6.jar BOOT-INF/lib/sentinel-cluster-common-default-1.8.6.jar BOOT-INF/lib/sentinel-cluster-client-default-1.8.6.jar BOOT-INF/lib/spring-cloud-alibaba-sentinel-datasource-2022.0.0.0-RC2.jar BOOT-INF/lib/spring-cloud-starter-alibaba-nacos-config-2022.0.0.0-RC2.jar BOOT-INF/lib/slf4j-api-2.0.7.jar BOOT-INF/lib/jakarta.annotation-api-2.1.1.jar BOOT-INF/lib/spring-boot-jarmode-layertools-3.0.5.jar BOOT-INF/classpath.idx BOOT-INF/layers.idx D:\新建文件夹 (4)\spzx-parent\spzx-manager\target>
最新发布
11-12
该文件为“普通文本型”问题,基于实际操作日志进行诊断。 --- ### ✅ 分析结论 你已成功执行: ```bash jar -tf spzx-manager-1.0-SNAPSHOT.jar | findstr BOOT-INF ``` 输出结果显示: - ✅ 存在 `BOOT-INF/classes/` `BOOT-INF/lib/` 目录 - ✅ 包含主类 `ManagerApplication.class` - ✅ 所有业务代码、Mapper、XML 映射文件齐全 - ✅ 第三方依赖完整(Spring Boot、MyBatis、MinIO、Knife4j 等) 📌 **这意味着:这个 JAR 文件是一个结构完整的可执行 Spring Boot 应用包!** --- ### 🔍 当前问题定位 尽管 JAR 包结构正确,但运行时仅显示 Spring Boot 启动横幅后**无后续日志输出**,说明: > **Spring Boot 应用在启动初期发生了阻塞或异常,且未打印错误堆栈。** --- ### 🚨 根本原因推测 结合你的环境(Windows + 中文路径 + 完整依赖),最可能的原因是: > **日志框架(Logback)因配置问题导致初始化失败,从而使 `System.out` 被关闭或重定向,造成“无声崩溃”。** 你在日志中看到这一行: ``` 17:50:45,098 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@55cf0d14 - URL [jar:file:/D:/新建文件夹%20(4)/spzx-parent/spzx-manager/target/spzx-manager-1.0-SNAPSHOT.jar!/BOOT-INF/classes!/logback-spring.xml] is not of type file ``` ⚠️ 这表明 Logback 无法正确读取 `logback-spring.xml` 文件,因为路径被编码为 `%20`,而 Logback 的某些版本对此支持不佳。 此外还有两个警告: ``` |-WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [CONSOLE] not referenced. Skipping further processing. |-WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [FILE] not referenced. Skipping further processing. ``` 说明 `logback-spring.xml` 中定义的 `<appender>` 没有被 `<root>` 引用,导致日志系统无效。 --- ### ✅ 解决方案 #### ✅ 步骤 1:修复 `logback-spring.xml` 配置 打开项目中的 `src/main/resources/logback-spring.xml`,确保有如下结构: ```xml <configuration> <!-- 定义 CONSOLE 输出 --> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <!-- 根日志器引用 CONSOLE --> <root level="INFO"> <appender-ref ref="CONSOLE"/> </root> </configuration> ``` 📌 **关键点**:必须有 `<appender-ref ref="CONSOLE"/>`,否则 Appender 不会被启用! --- #### ✅ 步骤 2:避免中文路径干扰日志加载 将整个项目复制到纯英文路径下重新打包运行: ```bash D:\test\spzx-manager\target ``` 然后执行: ```bash java -jar spzx-manager-1.0-SNAPSHOT.jar ``` 防止 `%20` 编码破坏资源加载。 --- #### ✅ 步骤 3:强制输出调试信息 使用 JVM 参数查看类加载过程,判断是否卡在某处: ```bash java -verbose:class -jar spzx-manager-1.0-SNAPSHOT.jar > classload.log 2>&1 ``` 运行后查看 `classload.log` 文件,看最后加载的是哪个类。 --- #### ✅ 步骤 4:检查 `application.yml` 是否激活了 `dev` profile 你有 `application-dev.yml.bak` 文件,但没有 `.yml` 正式文件。 🔧 必须将: ``` application-dev.yml.bak → 改名为 → application-dev.yml ``` 并在 `application.yml` 中指定: ```yaml spring: profiles: active: dev ``` 否则配置不生效,可能导致数据库连接失败等静默错误。 --- ### 🧩 知识点 1. **Logback 初始化机制** 若 `logback-spring.xml` 中未通过 `<appender-ref>` 引用 appender,会导致日志输出失效,甚至使控制台“沉默”。 2. **URL 编码与资源加载** 文件路径含空格时被编码为 `%20`,部分日志框架无法解析,导致配置文件加载失败。 3. **Spring Boot Profile 激活规则** `application-dev.yml` 必须存在且被 `spring.profiles.active=dev` 激活,`.bak` 文件不会被自动识别。 --- ### 📌 下一步建议 请立即执行以下三件事: 1. ✅ 将 `application-dev.yml.bak` 改名为 `application-dev.yml` 2. ✅ 修改 `logback-spring.xml` 添加 `<appender-ref ref="CONSOLE"/>` 3. ✅ 将项目移至 `D:\test\` 等英文路径下重新运行 JAR 然后再运行: ```bash java -jar spzx-manager-1.0-SNAPSHOT.jar ``` 观察是否出现正常日志输出。 如有新日志,请贴出来,我可以进一步帮你定位具体错误。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值