{"id":117995,"date":"2026-10-26T02:00:34","date_gmt":"2026-10-25T18:00:34","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/117995.html"},"modified":"2026-10-26T02:00:34","modified_gmt":"2026-10-25T18:00:34","slug":"spring-boot-3-5-%e9%9b%86%e6%88%90-opencv-4-12-%e6%97%b6-native-%e5%ba%93%e5%8a%a0%e8%bd%bd%e5%a4%b1%e8%b4%a5%e7%9a%84%e6%a0%b9","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/117995.html","title":{"rendered":"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839..."},"content":{"rendered":"<h2>Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839\u56e0\u4e0e JVM \u542f\u52a8\u53c2\u6570\u4fee\u590d<\/h2>\n<p>OpenCV \u7684 Java \u7ed1\u5b9a&#xff08;Java bindings&#xff09;\u5728\u5fae\u670d\u52a1\u5bb9\u5668\u5316\u90e8\u7f72\u4e2d&#xff0c;90% \u7684\u7a33\u5b9a\u6027\u95ee\u9898\u5e76\u975e\u6e90\u4e8e CV \u7b97\u6cd5\u903b\u8f91&#xff0c;\u800c\u662f\u5361\u5728 JVM \u5bf9 Native .so \u6216 .dll \u6587\u4ef6\u7684\u52a0\u8f7d\u673a\u5236\u4e0a\u3002<\/p>\n<p>\u4e0a\u5468\u6709\u4e2a\u9700\u6c42&#xff0c;\u8981\u5728 Spring Boot 3.5.1 \u670d\u52a1\u4e2d\u5b9e\u73b0\u5b9e\u65f6\u7684\u56fe\u50cf\u7455\u75b5\u68c0\u6d4b&#xff0c;\u6280\u672f\u6808\u5b9a\u4e3a OpenCV 4.12.0\u3002\u5f00\u53d1\u73af\u5883\u7528 mvn clean install \u8dd1\u901a\u5f97\u5f88\u987a\u6ed1&#xff0c;\u5355\u5143\u6d4b\u8bd5\u5168\u7eff\u3002\u4f46\u670d\u52a1\u4e00\u65e6\u6253\u5305\u6210 Fat Jar \u6254\u5230 K8s \u96c6\u7fa4\u91cc&#xff0c;\u542f\u52a8\u65e5\u5fd7\u91cc\u8d6b\u7136\u8eba\u7740\u4e00\u6761 UnsatisfiedLinkError\u3002\u8fd9\u73a9\u610f\u513f\u5728\u672c\u5730\u6ca1\u4e8b&#xff0c;\u4e00\u4e0a\u4e91\u5c31\u70b8&#xff0c;\u628a\u6574\u4e2a\u53d1\u5e03\u6d41\u7a0b\u5361\u4e86\u4e09\u5929\u3002<\/p>\n<h4>Native \u5e93\u9694\u79bb\u4e0e JVM \u53c2\u6570\u51b2\u7a81<\/h4>\n<p>OpenCV \u7684 Java \u5305&#xff08;opencv-4120.0-0.jar&#xff09;\u5185\u90e8\u6253\u5305\u4e86\u9488\u5bf9\u4e0d\u540c\u5e73\u53f0\u67b6\u6784\u7684 Native \u52a8\u6001\u94fe\u63a5\u5e93\u3002\u5f53 System.loadLibrary(&#034;opencv_java4120&#034;) \u88ab\u8c03\u7528\u65f6&#xff0c;JVM \u4f1a\u901a\u8fc7 ClassLoader \u627e\u5230\u8be5\u8d44\u6e90&#xff0c;\u4e34\u65f6\u89e3\u538b\u5230\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55&#xff08;\u901a\u5e38\u662f \/tmp&#xff09;&#xff0c;\u7136\u540e\u8c03\u7528 dlopen \u6216 LoadLibrary\u3002<\/p>\n<p>\u95ee\u9898\u51fa\u5728\u5bb9\u5668\u73af\u5883\u7684\u8d44\u6e90\u9650\u5236\u548c\u6587\u4ef6\u7cfb\u7edf\u6743\u9650\u4e0a\u3002\u6211\u4eec\u7684\u57fa\u7840\u955c\u50cf\u662f eclipse-temurin:17.0.12&#xff0c;\u4ee5\u975e root \u7528\u6237\u8fd0\u884c\u3002JVM \u9ed8\u8ba4\u5c1d\u8bd5\u5c06 Native \u5e93\u89e3\u538b\u5230 \/tmp&#xff0c;\u4f46\u5728\u67d0\u4e9b K8s \u8282\u70b9\u4e0a&#xff0c;\/tmp \u6302\u8f7d\u4e86 tmpfs \u4e14\u7a7a\u95f4\u6709\u9650&#xff0c;\u6216\u8005 \/tmp \u76ee\u5f55\u7684 sticky bit \u6743\u9650\u5bfc\u81f4\u89e3\u538b\u540e\u7684\u6587\u4ef6\u65e0\u6cd5\u88ab\u5176\u4ed6\u7ebf\u7a0b\u6b63\u786e mmap\u3002\u66f4\u9690\u853d\u7684\u662f&#xff0c;\u5982\u679c JVM \u542f\u52a8\u53c2\u6570\u4e2d\u542f\u7528\u4e86 AlwaysPreTouch&#xff08;\u7528\u4e8e\u9884\u89e6\u9875\u51cf\u5c11\u7f3a\u9875\u4e2d\u65ad&#xff0c;\u8fd9\u5728\u5185\u5b58\u5bc6\u96c6\u578b\u670d\u52a1\u4e2d\u5f88\u5e38\u89c1&#xff09;&#xff0c;\u5b83\u53ef\u80fd\u4f1a\u63d0\u524d\u9501\u5b9a\u5927\u91cf\u865a\u62df\u5185\u5b58&#xff0c;\u5bfc\u81f4\u540e\u7eed Native \u5e93\u6620\u5c04\u65f6\u5185\u5b58\u788e\u7247\u5316\u4e25\u91cd&#xff0c;dlopen \u5931\u8d25\u3002<\/p>\n<p>\u6211\u4eec\u6700\u521d\u6000\u7591\u662f\u4f9d\u8d56\u51b2\u7a81&#xff0c;\u5f15\u5165\u4e86\u4e24\u4e2a\u4e0d\u540c\u7248\u672c\u7684 OpenCV&#xff0c;\u7ed3\u679c\u53d1\u73b0\u9879\u76ee\u91cc\u53ea\u6709\u4e00\u4e2a opencv-4120.0-0\u3002\u771f\u6b63\u7684\u5143\u51f6\u662f JVM \u9ed8\u8ba4\u7684 java.io.tmpdir \u5728\u5bb9\u5668\u5185\u4e0d\u53ef\u5199\u6216\u7a7a\u95f4\u4e0d\u8db3\u3002<\/p>\n<h4>\u5bf9\u6bd4\u4e09\u79cd\u52a0\u8f7d\u7b56\u7565\u7684\u4f18\u52a3<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025180032-6ade43c099f1f.jpg\" alt=\"\u793a\u610f\u56fe\" style=\"max-width:100%;border-radius:8px;margin:16px 0\" \/><\/p>\n<p>\u9488\u5bf9\u8fd9\u4e2a\u95ee\u9898&#xff0c;\u6211\u4eec\u5bf9\u6bd4\u4e86\u4e09\u79cd\u5e38\u89c1\u7684\u52a0\u8f7d\u65b9\u6848\u3002<\/p>\n<p>| \u7b56\u7565 | \u5b9e\u73b0\u65b9\u5f0f | \u4f18\u70b9 | \u7f3a\u70b9 | \u9002\u7528\u573a\u666f || :&#8212; | :&#8212; | :&#8212; | :&#8212; | :&#8212; || \u6807\u51c6 System.load | \u4ee3\u7801\u4e2d\u76f4\u63a5\u8c03\u7528 System.load(&#034;\/path\/libopencv.so&#034;) | \u8def\u5f84\u660e\u786e&#xff0c;\u8c03\u8bd5\u5bb9\u6613 | \u8def\u5f84\u786c\u7f16\u7801&#xff0c;\u8de8\u5e73\u53f0&#xff08;Windows\/Linux&#xff09;\u9700\u7ef4\u62a4\u591a\u5957\u8def\u5f84 | \u5355\u673a\u90e8\u7f72&#xff0c;\u8def\u5f84\u56fa\u5b9a || System.loadLibrary | \u4f9d\u8d56 java.library.path \u6216 ClassLoader \u8d44\u6e90 | \u7b26\u5408 Java \u89c4\u8303&#xff0c;\u81ea\u52a8\u9002\u914d\u5e73\u53f0 | \u5728 Fat Jar \u4e2d\u8def\u5f84\u89e3\u6790\u590d\u6742&#xff0c;\u6613\u53d7 TMPDIR \u73af\u5883\u5f71\u54cd | \u6807\u51c6 Java \u9879\u76ee&#xff0c;\u975e\u5bb9\u5668\u5316 || \u663e\u5f0f\u89e3\u538b\u81f3\u6307\u5b9a\u76ee\u5f55 | \u5c06 .so \u4ece Jar \u4e2d\u89e3\u538b\u5230 \/opt\/opencv\/lib&#xff0c;\u901a\u8fc7 -Djava.library.path \u6307\u5b9a | \u5b8c\u5168\u7ed5\u8fc7 TMPDIR \u98ce\u9669&#xff0c;\u6027\u80fd\u7a33\u5b9a | \u9700\u8981 Dockerfile \u914d\u5408&#xff0c;\u6784\u5efa\u6d41\u7a0b\u7565\u7e41\u7410 | \u751f\u4ea7\u7ea7\u5bb9\u5668\u5316\u90e8\u7f72 |<\/p>\n<p>\u5728\u8fd9\u4e2a\u573a\u666f\u4e0b&#xff0c;\u7b2c\u4e09\u79cd\u65b9\u6848\u867d\u7136\u914d\u7f6e\u7a0d\u9ebb\u70e6&#xff0c;\u4f46\u5b83\u662f\u552f\u4e00\u80fd\u5f7b\u5e95\u9694\u79bb JVM \u4e34\u65f6\u76ee\u5f55\u98ce\u9669\u7684\u65b9\u6848\u3002\u6807\u51c6 loadLibrary \u867d\u7136\u7b80\u6d01&#xff0c;\u4f46\u5728\u9ad8\u5e76\u53d1\u6216\u5185\u5b58\u53d7\u9650\u7684\u5bb9\u5668\u4e2d&#xff0c;\/tmp \u7684\u4e0d\u53ef\u9760\u6027\u4f1a\u6210\u4e3a\u5b9a\u65f6\u70b8\u5f39\u3002<\/p>\n<h4>\u751f\u4ea7\u73af\u5883\u7684\u6700\u5c0f\u5316\u914d\u7f6e\u5b9e\u8df5<\/h4>\n<p>\u6211\u4eec\u5c06 OpenCV \u7684 Native \u5e93\u4ece Fat Jar \u4e2d\u63d0\u53d6\u51fa\u6765&#xff0c;\u653e\u5230\u5bb9\u5668\u955c\u50cf\u7684 \/opt\/opencv \u76ee\u5f55\u4e0b\u3002\u8fd9\u9700\u8981\u4fee\u6539 Maven \u6253\u5305\u63d2\u4ef6\u6216 Dockerfile\u3002<\/p>\n<p>\u9996\u5148&#xff0c;\u4f7f\u7528 Maven \u63d2\u4ef6\u5c06 Native \u5e93\u89e3\u538b\u5230\u76ee\u6807\u76ee\u5f55\u3002\u5728 pom.xml \u4e2d&#xff0c;\u6211\u4eec\u9700\u8981\u914d\u7f6e maven-antrun-plugin&#xff0c;\u5728 package \u9636\u6bb5\u5c06 opencv-4120.0-0.jar \u4e2d\u7684 .so \u6587\u4ef6\u590d\u5236\u5230\u672c\u5730\u76ee\u5f55\u3002<\/p>\n<p>&#096;&#096;&#096;xmlorg.apache.maven.pluginsmaven-antrun-plugin3.1.0packagerun&#096;&#096;&#096;<\/p>\n<p>\u7136\u540e\u5728 Dockerfile \u4e2d&#xff0c;\u5c06 native-libs \u76ee\u5f55\u590d\u5236\u5230 \/opt\/opencv&#xff0c;\u5e76\u8bbe\u7f6e JVM \u53c2\u6570\u3002<\/p>\n<p>&#096;&#096;&#096;dockerfileFROM eclipse-temurin:17.0.12-jre<\/p>\n<h2>\u5c06 OpenCV Native \u5e93\u590d\u5236\u5230\u56fa\u5b9a\u8def\u5f84<\/h2>\n<p>COPY native-libs\/libopencv_java4120.so \/opt\/opencv\/<\/p>\n<h2>\u521b\u5efa\u5e94\u7528\u76ee\u5f55<\/h2>\n<p>WORKDIR \/appCOPY target\/spring-boot-app-1.0.0.jar app.jar<\/p>\n<h2>\u5173\u952e&#xff1a;\u901a\u8fc7 JAVA_OPTS \u6307\u5b9a Native \u5e93\u8def\u5f84&#xff0c;\u907f\u514d\u4f9d\u8d56 \/tmp<\/h2>\n<p>ENV JAVA_OPTS&#061;&#034;-Djava.library.path&#061;\/opt\/opencv -XX:&#043;AlwaysPreTouch -Xms512m -Xmx512m&#034;<\/p>\n<p>ENTRYPOINT [&#034;sh&#034;, &#034;-c&#034;, &#034;java $JAVA_OPTS -jar app.jar&#034;]&#096;&#096;&#096;<\/p>\n<p>\u8fd9\u91cc\u6709\u4e00\u4e2a\u5bb9\u6613\u8e29\u7684\u5751&#xff1a;-Djava.library.path \u5fc5\u987b\u5728 JVM \u542f\u52a8\u524d\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u6216\u547d\u4ee4\u884c\u6307\u5b9a&#xff0c;\u5982\u679c\u5728 Java \u4ee3\u7801\u91cc\u52a8\u6001\u4fee\u6539 System.setProperty \u662f\u65e0\u6548\u7684\u3002\u53e6\u5916&#xff0c;AlwaysPreTouch \u53c2\u6570\u867d\u7136\u80fd\u63d0\u5347\u542f\u52a8\u540e\u7684\u5185\u5b58\u8bbf\u95ee\u7a33\u5b9a\u6027&#xff0c;\u4f46\u5982\u679c\u4f60\u7684\u5bb9\u5668\u5185\u5b58\u9650\u5236&#xff08;Memory Limit&#xff09;\u975e\u5e38\u7d27\u5f20&#xff08;\u6bd4\u5982 512MB&#xff09;&#xff0c;\u5b83\u53ef\u80fd\u4f1a\u5bfc\u81f4 OOMKilled&#xff0c;\u56e0\u4e3a JVM \u4f1a\u5c1d\u8bd5\u5728\u542f\u52a8\u65f6\u89e6\u78b0\u6240\u6709\u5806\u5185\u5b58\u3002\u5728\u6211\u4eec\u7684\u573a\u666f\u4e2d&#xff0c;\u5c06\u5806\u5185\u5b58\u8bbe\u4e3a 512MB&#xff0c;\u914d\u5408 AlwaysPreTouch&#xff0c;\u670d\u52a1\u542f\u52a8\u65f6\u95f4\u6162\u4e86\u7ea6 300ms&#xff0c;\u4f46\u8fd0\u884c\u671f GC \u505c\u987f\u65f6\u95f4\u51cf\u5c11\u4e86 15%\u3002<\/p>\n<h4>\u9a8c\u8bc1\u4e0e\u76d1\u63a7<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025180033-6ade43c13af16.jpg\" alt=\"\u793a\u610f\u56fe\" style=\"max-width:100%;border-radius:8px;margin:16px 0\" \/><\/p>\n<p>\u90e8\u7f72\u540e&#xff0c;\u6211\u4eec\u9700\u8981\u9a8c\u8bc1 Native \u5e93\u662f\u5426\u771f\u7684\u4ece \/opt\/opencv \u52a0\u8f7d&#xff0c;\u800c\u4e0d\u662f \/tmp\u3002\u53ef\u4ee5\u5728\u542f\u52a8\u65e5\u5fd7\u4e2d\u589e\u52a0\u4e00\u6761\u8c03\u8bd5\u4fe1\u606f&#xff0c;\u6216\u8005\u5728\u5bb9\u5668\u4e2d\u6267\u884c lsof -p  | grep opencv&#xff0c;\u67e5\u770b\u5e93\u6587\u4ef6\u7684\u5b9e\u9645\u8def\u5f84\u3002<\/p>\n<p>\u5982\u679c\u670d\u52a1\u8fd0\u884c\u6b63\u5e38&#xff0c;\u4f46\u56fe\u50cf\u5904\u7406\u7684\u8017\u65f6\u6ce2\u52a8\u5f88\u5927&#xff0c;\u68c0\u67e5 strace -p  -e trace&#061;read \u770b\u770b\u662f\u5426\u6709\u5927\u91cf\u7684 ENOENT \u9519\u8bef&#xff0c;\u8fd9\u901a\u5e38\u610f\u5473\u7740 Native \u5e93\u4f9d\u8d56\u7684 libglib \u6216 libjpeg \u7b49\u7cfb\u7edf\u5e93\u7248\u672c\u4e0d\u5339\u914d\u3002OpenCV 4.12.0 \u5bf9 GLib 2.60&#043; \u6709\u4f9d\u8d56&#xff0c;\u5982\u679c\u57fa\u7840\u955c\u50cf\u662f alpine \u7248\u672c&#xff0c;\u9700\u8981\u989d\u5916\u5b89\u88c5 libglib2.0&#xff0c;\u5426\u5219 dlopen \u4f1a\u56e0\u4e3a\u7f3a\u5c11\u4f9d\u8d56\u5e93\u800c\u9759\u9ed8\u5931\u8d25&#xff0c;\u629b\u51fa\u6a21\u7cca\u7684 UnsatisfiedLinkError\u3002<\/p>\n<h4>\u7ed3\u8bba<\/h4>\n<p>\u5728 Spring Boot 3.5 \u4e0e OpenCV 4.12.0 \u7684\u96c6\u6210\u4e2d&#xff0c;\u4e0d\u8981\u76f8\u4fe1 System.loadLibrary \u7684\u81ea\u52a8\u9b54\u6cd5\u3002\u5728\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u663e\u5f0f\u6307\u5b9a java.library.path \u5e76\u907f\u5f00 \/tmp \u662f\u6700\u7a33\u59a5\u7684\u65b9\u6848\u3002\u8fd9\u79cd\u201c\u7b28\u529e\u6cd5\u201d\u727a\u7272\u4e86\u5c11\u8bb8\u5f00\u53d1\u4fbf\u6377\u6027&#xff0c;\u6362\u6765\u4e86\u5bb9\u5668\u73af\u5883\u4e0b Native \u5e93\u52a0\u8f7d\u7684\u786e\u5b9a\u6027\u3002\u5982\u679c\u4f60\u7684\u670d\u52a1\u6d89\u53ca\u5927\u91cf\u56fe\u50cf\u5904\u7406&#xff0c;\u52a1\u5fc5\u5728\u538b\u6d4b\u4e2d\u5173\u6ce8 Native \u5185\u5b58\u6cc4\u6f0f&#xff0c;\u4f7f\u7528 jemalloc \u66ff\u4ee3 glibc malloc \u53ef\u80fd\u5e26\u6765\u610f\u5916\u7684\u6027\u80fd\u63d0\u5347\u3002<\/p>\n<p>#\u540e\u7aef #Java #SpringBoot #OpenCV #\u5bb9\u5668\u5316<\/p>\n<hr \/>\n<p>\u4f60\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u6709\u9047\u5230\u7c7b\u4f3c\u95ee\u9898\u5417&#xff1f;\u6b22\u8fce\u5728\u8bc4\u8bba\u533a\u5206\u4eab\u4f60\u7684\u7ecf\u9a8c\u548c\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839\u56e0\u4e0e JVM \u542f\u52a8\u53c2\u6570\u4fee\u590dOpenCV \u7684 Java \u7ed1\u5b9a&#xff08;Java bindings&#xff09;\u5728\u5fae\u670d\u52a1\u5bb9\u5668\u5316\u90e8\u7f72\u4e2d&#xff0c;90% \u7684\u7a33\u5b9a\u6027\u95ee\u9898\u5e76\u975e\u6e90\u4e8e CV \u7b97\u6cd5\u903b\u8f91&#xff0c;\u800c\u662f\u5361\u5728 JVM \u5bf9 Native .so \u6216 .dll \u6587\u4ef6\u7684\u52a0\u8f7d\u673a\u5236\u4e0a\u3002\u4e0a\u5468\u6709\u4e2a\u9700\u6c42&#xff0c;\u8981\u5728 Spring Boot 3.5.1 \u670d\u52a1\u4e2d\u5b9e\u73b0\u5b9e\u65f6\u7684\u56fe\u50cf\u7455\u75b5\u68c0\u6d4b<\/p>\n","protected":false},"author":2,"featured_media":117993,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13395],"topic":[],"class_list":["post-117995","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-13395"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839... - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/117995.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839... - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839\u56e0\u4e0e JVM \u542f\u52a8\u53c2\u6570\u4fee\u590dOpenCV \u7684 Java \u7ed1\u5b9a&#xff08;Java bindings&#xff09;\u5728\u5fae\u670d\u52a1\u5bb9\u5668\u5316\u90e8\u7f72\u4e2d&#xff0c;90% \u7684\u7a33\u5b9a\u6027\u95ee\u9898\u5e76\u975e\u6e90\u4e8e CV \u7b97\u6cd5\u903b\u8f91&#xff0c;\u800c\u662f\u5361\u5728 JVM \u5bf9 Native .so \u6216 .dll \u6587\u4ef6\u7684\u52a0\u8f7d\u673a\u5236\u4e0a\u3002\u4e0a\u5468\u6709\u4e2a\u9700\u6c42&#xff0c;\u8981\u5728 Spring Boot 3.5.1 \u670d\u52a1\u4e2d\u5b9e\u73b0\u5b9e\u65f6\u7684\u56fe\u50cf\u7455\u75b5\u68c0\u6d4b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/117995.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-25T18:00:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025180032-6ade43c099f1f.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/117995.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/117995.html\",\"name\":\"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839... - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-25T18:00:34+00:00\",\"dateModified\":\"2026-10-25T18:00:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/117995.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/117995.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/117995.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839...\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839... - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/117995.html","og_locale":"zh_CN","og_type":"article","og_title":"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839... - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839\u56e0\u4e0e JVM \u542f\u52a8\u53c2\u6570\u4fee\u590dOpenCV \u7684 Java \u7ed1\u5b9a&#xff08;Java bindings&#xff09;\u5728\u5fae\u670d\u52a1\u5bb9\u5668\u5316\u90e8\u7f72\u4e2d&#xff0c;90% \u7684\u7a33\u5b9a\u6027\u95ee\u9898\u5e76\u975e\u6e90\u4e8e CV \u7b97\u6cd5\u903b\u8f91&#xff0c;\u800c\u662f\u5361\u5728 JVM \u5bf9 Native .so \u6216 .dll \u6587\u4ef6\u7684\u52a0\u8f7d\u673a\u5236\u4e0a\u3002\u4e0a\u5468\u6709\u4e2a\u9700\u6c42&#xff0c;\u8981\u5728 Spring Boot 3.5.1 \u670d\u52a1\u4e2d\u5b9e\u73b0\u5b9e\u65f6\u7684\u56fe\u50cf\u7455\u75b5\u68c0\u6d4b","og_url":"https:\/\/www.wsisp.com\/helps\/117995.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-25T18:00:34+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025180032-6ade43c099f1f.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/117995.html","url":"https:\/\/www.wsisp.com\/helps\/117995.html","name":"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839... - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-25T18:00:34+00:00","dateModified":"2026-10-25T18:00:34+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/117995.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/117995.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/117995.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Spring Boot 3.5 \u96c6\u6210 OpenCV 4.12 \u65f6 Native \u5e93\u52a0\u8f7d\u5931\u8d25\u7684\u6839..."}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/117995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=117995"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/117995\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/117993"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=117995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=117995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=117995"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=117995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}