{"id":6171,"date":"2024-08-01T22:46:17","date_gmt":"2024-08-01T14:46:17","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=6171"},"modified":"2024-08-02T16:33:21","modified_gmt":"2024-08-02T08:33:21","slug":"%e8%bd%bb%e6%9d%be%e6%95%b4%e5%90%88%ef%bc%81%e7%94%a8-spring-boot-%e5%92%8c-apache-mahout-%e5%ae%9e%e7%8e%b0%e5%bc%ba%e5%a4%a7%e6%8e%a8%e8%8d%90%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/%e8%bd%bb%e6%9d%be%e6%95%b4%e5%90%88%ef%bc%81%e7%94%a8-spring-boot-%e5%92%8c-apache-mahout-%e5%ae%9e%e7%8e%b0%e5%bc%ba%e5%a4%a7%e6%8e%a8%e8%8d%90%e7%b3%bb%e7%bb%9f\/","title":{"rendered":"\u8f7b\u677e\u6574\u5408\uff01\u7528 Spring Boot \u548c Apache Mahout \u5b9e\u73b0\u5f3a\u5927\u63a8\u8350\u7cfb\u7edf"},"content":{"rendered":"<div class=\"wxsyncmain\">\n<section style=\"margin-bottom: 8px;\"><em>\u70b9\u51fb\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u66f4\u591a<strong>\u8d44\u8baf<\/strong>\u53ca\u65f6\u63a8\u9001\u2193<\/em><\/section>\n<section class=\"mp_profile_iframe_wrp\"><\/section>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">1. \u7b80\u4ecb<\/span><\/strong><\/h3>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">Spring Boot\u6982\u8ff0<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">Spring Boot\u662f\u7531Pivotal\u56e2\u961f\u63d0\u4f9b\u7684\u4e00\u4e2a\u6846\u67b6\uff0c\u7528\u6765\u7b80\u5316\u65b0Spring\u5e94\u7528\u7684\u521d\u59cb\u642d\u5efa\u53ca\u5f00\u53d1\u8fc7\u7a0b\u3002\u5176\u8bbe\u8ba1\u76ee\u6807\u662f\u7528\u6700\u5c0f\u7684\u5f00\u53d1\u91cf\u548c\u6700\u5c11\u7684\u914d\u7f6e\u642d\u5efa\u751f\u4ea7\u7ea7\u7684Spring\u5e94\u7528\u3002Spring Boot\u63d0\u4f9b\u4e86\u5f88\u591a\u9ed8\u8ba4\u914d\u7f6e\uff0c\u51cf\u5c11\u4e86\u5f00\u53d1\u65f6\u7684\u590d\u6742\u5ea6\u3002<\/span><\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">Apache Mahout\u6982\u8ff0<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">Apache Mahout\u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7684\u673a\u5668\u5b66\u4e60\u6846\u67b6\uff0c\u4e3b\u8981\u7528\u4e8e\u6784\u5efa\u53ef\u6269\u5c55\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u3002Mahout\u5305\u542b\u4e86\u534f\u540c\u8fc7\u6ee4\u3001\u805a\u7c7b\u548c\u5206\u7c7b\u7b49\u7b97\u6cd5\uff0c\u662f\u5927\u6570\u636e\u673a\u5668\u5b66\u4e60\u7684\u4e00\u4e2a\u91cd\u8981\u5de5\u5177\u3002<\/span><\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u4e3a\u4ec0\u4e48\u8981\u6574\u5408Spring Boot\u548cApache Mahout<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">\u5c06Spring Boot\u548cApache Mahout\u6574\u5408\uff0c\u53ef\u4ee5\u5feb\u901f\u6784\u5efa\u51fa\u57fa\u4e8e\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u7684Web\u5e94\u7528\u3002Spring Boot\u7b80\u5316\u4e86Web\u5e94\u7528\u7684\u5f00\u53d1\uff0cMahout\u5219\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u652f\u6301\uff0c\u4e8c\u8005\u7ed3\u5408\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u5e94\u7528\u6027\u80fd\u3002<\/span><\/section>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">2. \u73af\u5883\u51c6\u5907<\/span><\/strong><\/h3>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u5b89\u88c5Java JDK<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u9996\u5148\uff0c\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86JDK\u3002\u53ef\u4ee5\u5728Oracle\u5b98\u7f51\u4e0b\u8f7d\u5e76\u5b89\u88c5<\/span>\u3002<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"shell\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__meta\">$<\/span>java-version<\/span><\/code><\/pre>\n<\/section>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">\u786e\u8ba4JDK\u5b89\u88c5\u6210\u529f\u3002<\/span><\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u8bbe\u7f6eMaven\u9879\u76ee<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">Maven\u662f\u4e00\u4e2a\u9879\u76ee\u7ba1\u7406\u548c\u6784\u5efa\u5de5\u5177\uff0c\u7528\u4e8e\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u548c\u6784\u5efa\u8fc7\u7a0b\u3002\u786e\u4fdd\u5df2\u5b89\u88c5Maven\uff0c\u5e76\u914d\u7f6e\u597d\u73af\u5883\u53d8\u91cf\u3002<\/span><\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"shell\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__meta\">$<\/span>mvn-v<\/span><\/code><\/pre>\n<\/section>\n<section style=\"margin-bottom: 0px;\">\u786e\u8ba4Maven\u5b89\u88c5\u6210\u529f\u3002<\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u6dfb\u52a0\u4f9d\u8d56<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u5728Maven\u9879\u76ee\u7684pom.xml\u6587\u4ef6\u4e2d\u6dfb\u52a0Spring Boot\u548cApache Mahout\u7684\u4f9d\u8d56\uff1a<\/span><\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"xml\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">dependencies<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">dependency<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">groupId<\/span>&gt;<\/span>org.springframework.boot<span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">groupId<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">artifactId<\/span>&gt;<\/span>spring-boot-starter-web<span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">artifactId<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">dependency<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">dependency<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">groupId<\/span>&gt;<\/span>org.apache.mahout<span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">groupId<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">artifactId<\/span>&gt;<\/span>mahout-core<span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">artifactId<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">version<\/span>&gt;<\/span>14.1<span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">version<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">dependency<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">dependencies<\/span>&gt;<\/span><\/span><\/code><\/pre>\n<\/section>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">3. Spring Boot\u9879\u76ee\u521d\u59cb\u5316<\/span><\/strong><\/h3>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u521b\u5efaSpring Boot\u9879\u76ee<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">\u53ef\u4ee5\u901a\u8fc7Spring Initializr\u5feb\u901f\u521b\u5efa\u4e00\u4e2aSpring Boot\u9879\u76ee\u3002\u9009\u62e9\u9002\u5f53\u7684\u4f9d\u8d56\u540e\uff0c\u751f\u6210\u9879\u76ee\u5e76\u5bfc\u5165\u5230IDE\u4e2d\u3002<\/span><\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u914d\u7f6e\u9879\u76ee\u4f9d\u8d56<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u5728\u751f\u6210\u7684\u9879\u76ee\u4e2d\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u6dfb\u52a0\u9700\u8981\u7684\u4f9d\u8d56\uff0c\u6bd4\u5982\u7528\u4e8e\u5904\u7406JSON\u7684Jackson\u4f9d\u8d56<\/span>\uff1a<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"xml\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">dependency<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">groupId<\/span>&gt;<\/span>com.fasterxml.jackson.core<span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">groupId<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__tag\">&lt;<span class=\"code-snippet__name\">artifactId<\/span>&gt;<\/span>jackson-databind<span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">artifactId<\/span>&gt;<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__tag\">&lt;\/<span class=\"code-snippet__name\">dependency<\/span>&gt;<\/span><\/span><\/code><\/pre>\n<\/section>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">4. Apache Mahout\u7b80\u4ecb<\/span><\/strong><\/h3>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">Apache Mahout\u7684\u4e3b\u8981\u529f\u80fd<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">Apache Mahout\u4e3b\u8981\u63d0\u4f9b\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\u7684\u529f\u80fd\uff1a<\/span><\/section>\n<ul class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-bottom: 8px;\"><strong>\u534f\u540c\u8fc7\u6ee4<\/strong>\uff1a<span style=\"font-size: 16px;\">\u7528\u4e8e\u63a8\u8350\u7cfb\u7edf\uff0c\u57fa\u4e8e\u7528\u6237\u884c\u4e3a\u63a8\u8350\u7269\u54c1\u3002<\/span><\/section>\n<\/li>\n<li>\n<section style=\"margin-bottom: 8px;\"><strong>\u805a\u7c7b<\/strong>\uff1a<span style=\"font-size: 16px;\">\u5c06\u6570\u636e\u5206\u7ec4\uff0c\u627e\u51fa\u6570\u636e\u4e2d\u7684\u6a21\u5f0f\u3002<\/span><\/section>\n<\/li>\n<li><strong>\u5206\u7c7b<\/strong>\uff1a<span style=\"font-size: 16px;\">\u6839\u636e\u5df2\u6709\u7684\u6570\u636e\u5206\u7c7b\u6a21\u578b\uff0c\u5bf9\u65b0\u6570\u636e\u8fdb\u884c\u5206\u7c7b\u3002<\/span><\/li>\n<\/ul>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">Mahout\u7684\u6838\u5fc3\u7ec4\u4ef6<\/span><\/strong><\/h4>\n<ul class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-bottom: 8px;\"><strong>\u6570\u5b66\u5e93<\/strong>\uff1a<span style=\"font-size: 16px;\">\u63d0\u4f9b\u7ebf\u6027\u4ee3\u6570\u548c\u7edf\u8ba1\u5b66\u8ba1\u7b97\u3002<\/span><\/section>\n<\/li>\n<li>\n<section style=\"margin-bottom: 8px;\"><strong>\u63a8\u8350\u7b97\u6cd5<\/strong>\uff1a<span style=\"font-size: 16px;\">\u57fa\u4e8e\u7528\u6237\u884c\u4e3a\u7684\u534f\u540c\u8fc7\u6ee4\u7b97\u6cd5<\/span>\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-bottom: 8px;\"><strong>\u805a\u7c7b\u7b97\u6cd5<\/strong>\uff1a<span style=\"font-size: 16px;\">\u5982K-Means\u3001Canopy\u7b49\u3002<\/span><\/section>\n<\/li>\n<li><strong>\u5206\u7c7b\u7b97\u6cd5<\/strong>\uff1a<span style=\"font-size: 16px;\">\u5982\u6734\u7d20\u8d1d\u53f6\u65af\u3001\u968f\u673a\u68ee\u6797<\/span><span style=\"font-size: 16px;\">\u7b49\u3002<\/span><\/li>\n<\/ul>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">5. \u6574\u5408\u6b65\u9aa4<\/span><\/strong><\/h3>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u914d\u7f6eMahout\u73af\u5883<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">\u786e\u4fdd\u5df2\u7ecf\u6dfb\u52a0\u4e86Mahout\u7684\u4f9d\u8d56\uff0c\u5e76\u4e14\u80fd\u591f\u6210\u529f\u7f16\u8bd1\u9879\u76ee\u3002<\/span><\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u5728Spring Boot\u4e2d\u5f15\u5165Mahout<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u7f16\u5199\u4e00\u4e2a\u914d\u7f6e\u7c7b\uff0c\u5c06Mahout\u7684\u76f8\u5173\u914d\u7f6e\u6ce8\u5165\u5230Spring Boot\u4e2d\uff1a<\/span><\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<div>\n<pre>import org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\n\n@Configurationpublic\nclass MahoutConfig {\n    @Bean\n    public SomeMahoutService mahoutService() {\n        return new SomeMahoutService();\n    }\n}<\/pre>\n<\/div>\n<\/section>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">6. \u793a\u4f8b\u5e94\u7528<\/span><\/strong><\/h3>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u6570\u636e\u51c6\u5907<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">\u51c6\u5907\u4e00<\/span><span style=\"font-size: 16px;\">\u4efd\u7528\u6237\u884c\u4e3a\u6570\u636e\uff0c\u4f8b\u5982\u7528\u6237\u5bf9\u5546\u54c1\u7684\u8bc4\u5206\u6570\u636e\u3002<\/span><\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u7f16\u5199\u63a8\u8350\u7b97\u6cd5<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u4f7f\u7528Mahout\u7684\u63a8\u8350\u7b97\u6cd5\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684\u63a8\u8350\u7cfb\u7edf\uff1a<\/span><\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<div>\n<pre>import org.apache.mahout.cf.taste.eval.DataModelBuilder;\nimport org.apache.mahout.cf.taste.impl.model.file.FileDataModel;\nimport org.apache.mahout.cf.taste.impl.neighborhood.NearestNUserNeighborhood;\nimport org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender;\nimport org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity;\nimport org.apache.mahout.cf.taste.model.DataModel;\nimport org.apache.mahout.cf.taste.similarity.UserSimilarity;\n\nimport java.io.File;\n\npublic class RecommenderService {\n    public List&lt;RecommendedItem&gt; recommend(Long userId, int howMany) throws Exception {\n        DataModel model = new FileDataModel(new File(\"data\/ratings.csv\"));\n        UserSimilarity similarity = new PearsonCorrelationSimilarity(model);\n        UserNeighborhood neighborhood = new NearestNUserNeighborhood(2, similarity, model);\n        Recommender recommender = new GenericUserBasedRecommender(model, neighborhood, similarity);\n        return recommender.recommend(userId, howMany);\n    }\n}<\/pre>\n<\/div>\n<\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u5b9e\u73b0\u63a8\u8350\u63a5\u53e3<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u5728Spring Boot\u4e2d\u5b9e\u73b0\u4e00\u4e2aREST\u63a5\u53e3\uff0c\u63d0\u4f9b\u63a8\u8350\u529f\u80fd\uff1a<\/span><\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<div>\n<pre>import org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestControllerpublic\nclass RecommenderController {\n    private final RecommenderService recommenderService;\n\n    public RecommenderController(RecommenderService recommenderService) {\n        this.recommenderService = recommenderService;\n    }\n\n    @GetMapping(\"\/recommend\")\n    public List&lt;RecommendedItem&gt; recommend(@RequestParam Long userId, @RequestParam int count) {\n        try {\n            return recommenderService.recommend(userId, count);\n        } catch (Exception e) {\n            e.printStackTrace();\n            return Collections.emptyList();\n        }\n    }\n}<\/pre>\n<\/div>\n<\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u6d4b\u8bd5\u548c\u8fd0\u884c<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 16px;\">\u542f\u52a8Spring Boot\u5e94\u7528\uff0c\u8bbf\u95ee\u63a8\u8350\u63a5\u53e3\uff0c\u9a8c\u8bc1\u662f\u5426\u80fd\u591f\u6b63\u786e\u8fd4\u56de\u63a8\u8350\u7ed3\u679c\u3002<\/span><\/section>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">7. \u6027\u80fd\u4f18\u5316<\/span><\/strong><\/h3>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">\u8c03\u6574Mahout\u53c2\u6570<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u6839\u636e\u6570\u636e\u89c4\u6a21\u548c\u63a8\u8350\u7b97\u6cd5\u7684\u9700\u6c42\uff0c\u8c03\u6574Mahout\u7684\u76f8\u5173\u53c2\u6570\uff0c\u5982\u76f8\u4f3c\u5ea6\u8ba1\u7b97\u65b9\u6cd5\u3001\u90bb\u5c45\u6570\u91cf\u7b49\u3002<\/span><\/section>\n<h4 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">Spring Boot\u6027\u80fd\u8c03\u4f18<\/span><\/strong><\/h4>\n<section style=\"margin-bottom: 8px;\"><span style=\"font-size: 16px;\">\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u6216\u4ee3\u7801\u4f18\u5316Spring Boot\u5e94\u7528\u7684\u6027\u80fd\uff0c\u4f8b\u5982\u8c03\u6574\u7ebf\u7a0b\u6c60\u3001\u6570\u636e\u5e93\u8fde\u63a5\u6c60\u7b49\u53c2\u6570\u3002<\/span><\/section>\n<h3 style=\"margin-top: 16px; margin-bottom: 8px;\"><strong><span style=\"font-size: 18px;\">8. \u603b\u7ed3<\/span><\/strong><\/h3>\n<p><span style=\"font-size: 16px;\">\u6574\u5408Spring Boot\u548cApache Mahout\uff0c\u80fd\u591f\u5feb\u901f\u6784\u5efa\u4e00\u4e2a\u57fa\u4e8e\u673a\u5668\u5b66\u4e60\u7684Web\u5e94\u7528\u3002\u901a\u8fc7\u5408\u7406\u7684\u914d\u7f6e\u548c\u4f18\u5316\uff0c\u53ef\u4ee5\u63d0\u9ad8\u5e94\u7528\u7684\u6027\u80fd\u548c\u63a8\u8350\u6548\u679c\u3002\u672a\u6765\u53ef\u4ee5\u8fdb\u4e00\u6b65\u6269\u5c55\uff0c\u589e\u52a0\u66f4\u591a\u7684\u7b97\u6cd5\u652f\u6301\u548c\u529f\u80fd\u5b9e\u73b0\u3002<\/span><\/p>\n<p style=\"text-align: center; margin-bottom: 0px;\"><img decoding=\"async\" class=\"rich_pages wxw-img js_insertlocalimg lazyload\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223708371.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-imgfileid=\"100001458\" data-ratio=\"0.3794642857142857\" data-s=\"300,640\" data-type=\"png\" data-w=\"896\" \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img js_insertlocalimg\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223708371.png\" data-imgfileid=\"100001458\" data-ratio=\"0.3794642857142857\" data-s=\"300,640\" data-type=\"png\" data-w=\"896\" \/><\/noscript><\/p>\n<section style=\"margin: 0px 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; letter-spacing: 0.544px; white-space: pre-line; line-height: 30px; color: #4a4a4a; font-family: Avenir, -apple-system-font, \u5fae\u8f6f\u96c5\u9ed1, sans-serif;\"><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #78acfe; font-size: 15px;\">\u83b7\u53d6\u65b9\u5f0f\uff1a\u70b9\u201c<\/span><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.544px; line-height: 30px; color: #3da742; font-size: 18px;\">\u5728\u770b<\/span><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #78acfe; font-size: 15px;\">\u201d\uff0c\u5173\u6ce8\u516c\u4f17\u53f7\u5e76\u56de\u590d\u3010<\/span><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #3da742; font-size: 18px;\">Java\u30011024\u3001AI\u3001\u6e38\u620f<\/span><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #78acfe; font-size: 15px;\">\u3011<\/span><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #78acfe; font-size: 15px;\">\u9886\u53d6\uff0c<\/span><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #78acfe; font-size: 15px;\">\u66f4\u591a\u5185\u5bb9\u9646\u7eed\u5949\u4e0a\u3002<\/span><\/section>\n<section style=\"margin: 0px 0px 10px; padding: 8px 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; white-space: normal; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; text-align: right; line-height: 1.6; color: #3f3f3f;\"><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.544px; text-align: left; font-size: 15px; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light;\">PS\uff1a\u56e0\u516c\u4f17\u53f7\u5e73\u53f0\u66f4\u6539\u4e86\u63a8\u9001\u89c4\u5219\uff0c\u5982\u679c\u4e0d\u60f3\u9519\u8fc7\u5185\u5bb9\uff0c\u8bb0\u5f97\u8bfb\u5b8c\u70b9\u4e00\u4e0b<\/span><strong style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.544px; text-align: left; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light; font-size: 12px;\">\u201c<span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #ff0000;\">\u5728\u770b<\/span>\u201d<\/strong><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.544px; text-align: left; font-size: 15px; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light;\">\uff0c\u52a0\u4e2a<\/span><strong style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.544px; text-align: left; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light; font-size: 12px;\">\u201c<span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #ff0000;\">\u661f\u6807<\/span>\u201d<\/strong><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.544px; text-align: left; font-size: 15px; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light;\">\uff0c\u8fd9\u6837\u6bcf\u6b21\u65b0\u6587\u7ae0\u63a8\u9001\u624d\u4f1a\u7b2c\u4e00\u65f6\u95f4\u51fa\u73b0\u5728\u4f60\u7684\u8ba2\u9605\u5217\u8868\u91cc\u3002<\/span><\/section>\n<p style=\"margin: 10px 0px 0px; padding: 8px 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; white-space: normal; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; text-align: right; line-height: 1.6; color: #3f3f3f;\"><span style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.544px; text-align: left; font-size: 15px; font-family: Optima-Regular, PingFangTC-light; visibility: visible; color: #ff0000;\">\u70b9<strong style=\"margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u201c\u5728\u770b\u201d<\/strong>\u652f\u6301\u7801\u519c\u5440\uff0c\u8c22\u8c22\u5566<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" style=\"width: 578px; height: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223751305.gif\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-galleryid=\"\" data-imgfileid=\"100001457\" data-ratio=\"0.06442577030812324\" data-type=\"gif\" data-w=\"1071\" \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 578px; height: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223751305.gif\" data-galleryid=\"\" data-imgfileid=\"100001457\" data-ratio=\"0.06442577030812324\" data-type=\"gif\" data-w=\"1071\" \/><\/noscript><\/p>\n<p style=\"display: none;\">\n<blockquote><p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7: \u65b0\u751f\u4ee3\u7801\u519c<\/p><\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u70b9\u51fb\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u66f4\u591a\u8d44\u8baf\u53ca\u65f6\u63a8\u9001\u2193 1. \u7b80\u4ecb Spring Boot\u6982\u8ff0 Spring Boot\u662f\u7531Pivotal\u56e2\u961f\u63d0\u4f9b\u7684\u4e00\u4e2a &#8230;<\/p>\n","protected":false},"author":1,"featured_media":6096,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-6171","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223650318-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223708371.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223650318-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223650318-1024x435.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223708371.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223650318-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223650318-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223650318.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223708371.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223708371.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223751305.gif","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223751305.gif","id":"image3"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2024-08-01","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":1001,"next_post_id":5997,"next_post_title":"SpringBoot\u5b9e\u73b0\u5206\u5e03\u5f0f\u9a8c\u8bc1\u7801\u767b\u5f55\u65b9\u6848","previous_post_id":4795,"previous_post_title":"SpringBoot\u6253\u5305\u6210Docker\u955c\u50cf","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=6171"}],"version-history":[{"count":2,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6171\/revisions"}],"predecessor-version":[{"id":6459,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6171\/revisions\/6459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/6096"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=6171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=6171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=6171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}