{"id":10020385,"date":"2024-11-07T18:37:19","date_gmt":"2024-11-07T10:37:19","guid":{"rendered":"https:\/\/itmax.cn\/?p=10020385"},"modified":"2024-11-07T18:37:19","modified_gmt":"2024-11-07T10:37:19","slug":"springboot%e5%bf%85%e9%a1%bb%e6%8e%8c%e6%8f%a1%e7%9a%84%e5%b8%b8%e7%94%a8%e6%b3%a8%e8%a7%a3%ef%bc%81","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10020385","title":{"rendered":"SpringBoot\u5fc5\u987b\u638c\u63e1\u7684\u5e38\u7528\u6ce8\u89e3\uff01"},"content":{"rendered":"<p>Spring Boot \u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u6ce8\u89e3\uff0c\u7528\u4e8e<strong>\u7b80\u5316\u914d\u7f6e\u548c\u52a0\u901f\u7a0b\u5e8f\u5f00\u53d1<\/strong>\u3002<\/p>\n<p>\u90a3\u4e48\u63a5\u4e0b\u6765\uff0c\u54b1\u4eec\u5c31\u4e00\u8d77\u6765\u770b\u4e0b Spring Boot \u4e2d\u7684\u5e38\u7528\u6ce8\u89e3\u6709\u54ea\u4e9b\uff1f\u53ca\u5176\u8fd9\u4e9b\u6ce8\u89e3\u7684\u5177\u4f53\u4f7f\u7528\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000045455628\" alt=\"\" title=\"\"><\/p>\n<h2>1.Bean\u76f8\u5173<\/h2>\n<ol>\n<li><strong>@Component<\/strong>\uff1a\u5c06\u4e00\u4e2a\u7c7b\u6807\u8bc6\u4e3a Spring \u7ec4\u4ef6\uff08Bean\uff09\uff0c\u53ef\u4ee5\u88ab Spring \u5bb9\u5668\u81ea\u52a8\u68c0\u6d4b\u548c\u6ce8\u518c\u3002\u901a\u7528\u6ce8\u89e3\uff0c\u9002\u7528\u4e8e\u4efb\u4f55\u5c42\u6b21\u7684\u7ec4\u4ef6\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Component\npublic class MyComponent {\n    public void doSomething() {\n        System.out.println(&quot;MyComponent is doing something.&quot;);\n    }\n}<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>@ComponentScan<\/strong>\uff1a\u81ea\u52a8\u626b\u63cf\u6307\u5b9a\u5305\u53ca\u5176\u5b50\u5305\u4e2d\u7684 Spring \u7ec4\u4ef6\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@ComponentScan(&quot;com.example&quot;) \/\/ \u626b\u63cfcom.example\u5305\u4e0b\u7684\u7ec4\u4ef6\uff0c\u52a0\u8f7d\u5230Spring\u5bb9\u5668\n@SpringBootApplication\npublic class DemoApplication {\n    public static void main(String[] args) {\n        SpringApplication.run(DemoApplication.class, args);\n    }\n}<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>@Controller<\/strong>\uff1a\u6807\u8bc6\u63a7\u5236\u5c42\u7ec4\u4ef6\uff0c\u5b9e\u9645\u4e0a\u662f @Component \u7684\u4e00\u4e2a\u7279\u5316\uff0c\u7528\u4e8e\u8868\u793a Web \u63a7\u5236\u5668\u3002\u5904\u7406 HTTP \u8bf7\u6c42\u5e76\u8fd4\u56de\u89c6\u56fe\u6216\u54cd\u5e94\u6570\u636e\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Controller\npublic class MyController {\n    @Autowired\n    private final UserService userService;\n\n    @GetMapping(&quot;\/user&quot;)\n    public String getUser(Model model) {\n        User user = userService.getUserById(1);\n        model.addAttribute(&quot;user&quot;, user);\n        return &quot;user&quot;;\n    }\n}<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>@RestController<\/strong>\uff1a\u662f @Controller \u548c @ResponseBody \u7684\u7ed3\u5408\uff0c\u8fd4\u56de\u7684\u5bf9\u8c61\u4f1a\u81ea\u52a8\u5e8f\u5217\u5316\u4e3a JSON \u6216 XML\uff0c\u5e76\u5199\u5165 HTTP \u54cd\u5e94\u4f53\u4e2d\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\npublic class MyController {\n    @Autowired\n    private final UserService userService;\n\n    @GetMapping(&quot;\/user&quot;)\n    public User getUser() {\n        User user = userService.getUserById(1);\n        return user;\n    }\n}<\/code><\/pre>\n<ol start=\"5\">\n<li><strong>@Service<\/strong>\uff1a\u6807\u8bc6\u670d\u52a1\u5c42\u7ec4\u4ef6\uff0c\u5b9e\u9645\u4e0a\u662f @Component \u7684\u4e00\u4e2a\u7279\u5316\uff0c\u7528\u4e8e\u8868\u793a\u4e1a\u52a1\u903b\u8f91\u670d\u52a1\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Service\npublic class MyService {\n}<\/code><\/pre>\n<ol>\n<li><strong>@Repository<\/strong>\uff1a\u6807\u8bc6\u6301\u4e45\u5c42\u7ec4\u4ef6\uff08DAO \u5c42\uff09\uff0c\u5b9e\u9645\u4e0a\u662f @Component \u7684\u4e00\u4e2a\u7279\u5316\uff0c\u7528\u4e8e\u8868\u793a\u6570\u636e\u8bbf\u95ee\u7ec4\u4ef6\u3002\u5e38\u7528\u4e8e\u4e0e\u6570\u636e\u5e93\u4ea4\u4e92\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Repository\npublic interface UserDao {\n}<\/code><\/pre>\n<ol start=\"7\">\n<li><strong>@Bean<\/strong>\uff1a\u65b9\u6cd5\u6ce8\u89e3\uff0c\u7528\u4e8e\u4fee\u9970\u65b9\u6cd5\uff0c\u4e3b\u8981\u529f\u80fd\u662f\u5c06\u4fee\u9970\u65b9\u6cd5\u7684\u8fd4\u56de\u5bf9\u8c61\u6dfb\u52a0\u5230 Spring \u5bb9\u5668\u4e2d\uff0c\u4f7f\u5f97\u5176\u4ed6\u7ec4\u4ef6\u53ef\u4ee5\u901a\u8fc7\u4f9d\u8d56\u6ce8\u5165\u7684\u65b9\u5f0f\u4f7f\u7528\u8fd9\u4e2a\u5bf9\u8c61\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Configuration\npublic class AppConfig {\n    @Bean\n    public MyBean myBean() {\n        return new MyBean();\n    }\n}<\/code><\/pre>\n<ol start=\"8\">\n<li><strong>@Configuration<\/strong>\uff1a\u6807\u8bc6\u4e00\u4e2a\u7c7b\u4f5c\u4e3a\u914d\u7f6e\u7c7b\uff0c@Component \u7684\u4e00\u4e2a\u7279\u5316\uff0c\u901a\u5e38\u914d\u5408 @Bean \u6ce8\u89e3\u4e00\u8d77\u4f7f\u7528\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Configuration\npublic class AppConfig {\n}<\/code><\/pre>\n<ol start=\"9\">\n<li><strong>@Scope<\/strong>\uff1a\u7528\u4e8e\u58f0\u660e\u4e00\u4e2a Spring Bean \u5b9e\u4f8b\u7684\u4f5c\u7528\u57df\uff0c\u4f5c\u7528\u57df\u7684\u8303\u56f4\u6709\u5355\u4f8b\u6a21\u5f0f\u3001\u539f\u578b\u6a21\u5f0f\uff08\u591a\u4f8b\u6a21\u5f0f\uff09\u7b49\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Configuration\npublic class AppConfig {\n    @Bean\n    @Scope(&quot;prototype&quot;)\n    public MyPrototypeBean myPrototypeBean() {\n        return new MyPrototypeBean();\n    }\n}<\/code><\/pre>\n<h2>2.\u4f9d\u8d56\u6ce8\u5165<\/h2>\n<ol>\n<li><strong>@Autowired<\/strong>\uff1a\u7528\u4e8e\u81ea\u52a8\u6ce8\u5165\u4f9d\u8d56\u5bf9\u8c61\uff0cSpring \u6846\u67b6\u63d0\u4f9b\u7684\u6ce8\u89e3\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\npublic class MyController {\n    @Autowired\n    private final UserService userService;\n\n    @GetMapping(&quot;\/user&quot;)\n    public User getUser() {\n        User user = userService.getUserById(1);\n        return user;\n    }\n}<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>@Resource<\/strong>\uff1a\u6309\u540d\u79f0\u81ea\u52a8\u6ce8\u5165\u4f9d\u8d56\u5bf9\u8c61\uff08\u4e5f\u53ef\u4ee5\u6309\u7c7b\u578b\uff0c\u4f46\u9ed8\u8ba4\u6309\u540d\u79f0\uff09\uff0cJDK \u63d0\u4f9b\u6ce8\u89e3\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\npublic class MyController {\n    @Resource\n    private final UserService userService;\n\n    @GetMapping(&quot;\/user&quot;)\n    public User getUser() {\n        User user = userService.getUserById(1);\n        return user;\n    }\n}<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>@Qualifier<\/strong>\uff1a\u4e0e @Autowired \u4e00\u8d77\u4f7f\u7528\uff0c\u7528\u4e8e\u6307\u5b9a\u8981\u6ce8\u5165\u7684 Bean \u7684\u540d\u79f0\u3002\u5f53\u5b58\u5728\u591a\u4e2a\u76f8\u540c\u7c7b\u578b\u7684 Bean \u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528 @Qualifier \u6765\u6307\u5b9a\u6ce8\u5165\u54ea\u4e00\u4e2a\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\npublic class MyController {\n    @Autowired\n    @Qualifier(&quot;userService&quot;)\n    private final UserService us;\n\n    @GetMapping(&quot;\/user&quot;)\n    public User getUser() {\n        User user = userService.getUserById(1);\n        return user;\n    }\n}<\/code><\/pre>\n<h2>3.Web\u76f8\u5173<\/h2>\n<ol>\n<li><strong>@RequestMapping<\/strong>\uff1a\u7528\u4e8e\u6620\u5c04 HTTP \u8bf7\u6c42\u5230\u5904\u7406\u65b9\u6cd5\u4e0a\uff0c\u652f\u6301 GET\u3001POST\u3001PUT\u3001DELETE \u7b49\u8bf7\u6c42\u65b9\u6cd5\u3002\u53ef\u4ee5\u6807\u6ce8\u5728\u7c7b\u6216\u65b9\u6cd5\u4e0a\u3002\u6807\u6ce8\u5728\u7c7b\u4e0a\u65f6\uff0c\u8868\u793a\u7c7b\u4e2d\u7684\u6240\u6709\u54cd\u5e94\u8bf7\u6c42\u7684\u65b9\u6cd5\u90fd\u662f\u4ee5\u8be5\u7c7b\u8def\u5f84\u4e3a\u7236\u8def\u5f84\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\n@RequestMapping(&quot;\/contoller&quot;)\npublic class MyController {\n    @Resource\n    private final UserService userService;\n\n    @RequestMapping(&quot;\/user&quot;)\n    public User getUser() {\n        User user = userService.getUserById(1);\n        return user;\n    }\n}<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>@GetMapping\u3001@PostMapping\u3001@PutMapping\u3001@DeleteMapping<\/strong>\uff1a\u5206\u522b\u7528\u4e8e\u6620\u5c04 HTTP GET\u3001POST\u3001PUT\u3001DELETE \u8bf7\u6c42\u5230\u5904\u7406\u65b9\u6cd5\u4e0a\u3002\u5b83\u4eec\u662f @RequestMapping \u7684\u7279\u5316\uff0c\u5206\u522b\u5bf9\u5e94\u4e0d\u540c\u7684 HTTP \u8bf7\u6c42\u65b9\u6cd5\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\n@GetMapping(&quot;\/contoller&quot;)\npublic class MyController {\n    @Resource\n    private final UserService userService;\n\n    @GetMapping(&quot;\/user&quot;)\n    public User getUser() {\n        User user = userService.getUserById(1);\n        return user;\n    }\n}<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>@RequestParam<\/strong>\uff1a\u7528\u4e8e\u5c06\u8bf7\u6c42\u53c2\u6570\u7ed1\u5b9a\u5230 Controller \u65b9\u6cd5\u7684\u53c2\u6570\u4e0a\u3002\u5b83\u4e3b\u8981\u7528\u4e8e\u5904\u7406 GET\u3001POST \u7b49\u8bf7\u6c42\u4e2d\u7684\u67e5\u8be2\u53c2\u6570\uff0c\u4f8b\u5982\u5c06 <a href=\"https:\/\/link.segmentfault.com\/?enc=38CPSXSPNGrNYJ4cOMNfTg%3D%3D.G%2Bqk5oXLfFq5JZ97n78UJaDxDivqY3xg6HzrK0P7qyoQhdvffGt%2FSZkXJyURzOtlN8xS9TeJUsFkWcOMy1QqJQ%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">http:\/\/example.com\/api?param1=value1&#038;param2=value2<\/a> \u4e2d\u7684 param1 \u548c param2 \u53c2\u6570\u8bbe\u7f6e\u5230\u65b9\u6cd5\u7684\u53c2\u6570\u4e0a\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\npublic class MyController {\n    @GetMapping(&quot;\/hello&quot;)\n    public String sayHello(@RequestParam(&quot;name&quot;) String userName) {\n        return &quot;Hello, &quot; + userName;\n    }\n}<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>@PathVariable<\/strong>\uff1a\u7528\u4e8e\u4ece\u8bf7\u6c42\u7684 URL \u8def\u5f84\u4e2d\u63d0\u53d6\u53d8\u91cf\u503c\uff0c\u5e76\u5c06\u5176\u7ed1\u5b9a\u5230\u63a7\u5236\u5668\u65b9\u6cd5\u7684\u53c2\u6570\u4e0a\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@GetMapping(&quot;\/user\/{userId}&quot;)\npublic String getUserById(@PathVariable(&quot;userId&quot;) Long id) {\n    return &quot;User with ID &quot; + id;\n}<\/code><\/pre>\n<ol start=\"5\">\n<li><strong>@RequestBody<\/strong>\uff1a\u5c06 HTTP \u8bf7\u6c42\u4f53\u7684\u5185\u5bb9\uff08\u5982 JSON\u3001XML\uff09\u8f6c\u6362\u4e3a Java \u5bf9\u8c61\u3002\u901a\u5e38\u7528\u4e8e\u63a5\u6536\u524d\u7aef\u4f20\u9012\u7684\u6570\u636e\uff0c\u6807\u6ce8\u5728\u65b9\u6cd5\u7684\u53c2\u6570\u4e0a\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Controller\npublic class MyController {\n    @PostMapping(&quot;\/submit&quot;)\n    public String submitData(@RequestBody MyData myData) {\n        System.out.println(myData);\n        return &quot;success&quot;;\n    }\n}<\/code><\/pre>\n<ol start=\"6\">\n<li><strong>@ResponseBody<\/strong>\uff1a\u5c06\u65b9\u6cd5\u7684\u8fd4\u56de\u503c\u8f6c\u6362\u4e3a\u6307\u5b9a\u683c\u5f0f\uff08\u5982 JSON\u3001XML\uff09\u4f5c\u4e3a HTTP \u54cd\u5e94\u7684\u5185\u5bb9\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002\u901a\u5e38\u4e0e @RequestMapping \u6216 @GetMapping \u7b49\u6ce8\u89e3\u4e00\u8d77\u4f7f\u7528\u5728\u65b9\u6cd5\u4e0a\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@RestController\npublic class MyController {\n    @GetMapping(&quot;\/data&quot;)\n    @ResponseBody\n    public String getData() {\n        return &quot;Some data&quot;;\n    }\n}<\/code><\/pre>\n<h2>4. \u8bfb\u53d6\u914d\u7f6e<\/h2>\n<ol>\n<li><strong>@Value<\/strong>\uff1a\u7528\u4e8e\u6ce8\u5165\u5c5e\u6027\u503c\uff0c\u901a\u5e38\u4ece\u914d\u7f6e\u6587\u4ef6\u4e2d\u83b7\u53d6\u3002\u6807\u6ce8\u5728\u5b57\u6bb5\u4e0a\uff0c\u5e76\u6307\u5b9a\u5c5e\u6027\u503c\u7684\u6765\u6e90\uff08\u5982\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u67d0\u4e2a\u5c5e\u6027\uff09\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@Component\npublic class MyComponent {\n    @Value(&quot;${my.property}&quot;)\n    private String myPropertyValue;\n\n    public void printValue() {\n        System.out.println(myPropertyValue);\n    }\n}<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>@ConfigurationProperties<\/strong>\uff1a\u7528\u4e8e\u5c06\u914d\u7f6e\u5c5e\u6027\u7ed1\u5b9a\u5230\u4e00\u4e2a\u5b9e\u4f53\u7c7b\u4e0a\u3002\u901a\u5e38\u7528\u4e8e\u4ece\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bfb\u53d6\u5c5e\u6027\u503c\u5e76\u7ed1\u5b9a\u5230\u7c7b\u7684\u5b57\u6bb5\u4e0a\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">import org.springframework.boot.context.properties.ConfigurationProperties;\nimport org.springframework.stereotype.Component;\n\n@Component\n@ConfigurationProperties(prefix = &quot;my.app&quot;)\npublic class MyAppProperties {\n    private String property1;\n    private int property2;\n\n    \/\/ Getters and setters\n}<\/code><\/pre>\n<h2>5. \u914d\u7f6e\u542f\u52a8\u6ce8\u89e3<\/h2>\n<ol>\n<li><strong>@SpringBootApplication<\/strong>\uff1a\u7528\u4e8e\u6807\u8bc6 SpringBoot \u5e94\u7528\u7a0b\u5e8f\u7684\u5165\u53e3\u7c7b\u3002\u5b83\u662f\u4e00\u4e2a\u7ec4\u5408\u6ce8\u89e3\uff0c\u5305\u62ec\u4e86 @Configuration\u3001@EnableAutoConfiguration \u548c @ComponentScan \u4e09\u4e2a\u6ce8\u89e3\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">@SpringBootApplication\npublic class DemoApplication {\n    public static void main(String[] args) {\n        SpringApplication.run(DemoApplication.class, args);\n    }\n}<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>@EnableAutoConfiguration<\/strong>\uff1a\u542f\u7528 Spring Boot \u7684\u81ea\u52a8\u914d\u7f6e\u673a\u5236\uff0c\u6839\u636e\u6dfb\u52a0\u7684\u4f9d\u8d56\u548c\u914d\u7f6e\u6587\u4ef6\u81ea\u52a8\u914d\u7f6e Spring \u5e94\u7528\u3002<\/li>\n<\/ol>\n<h2>6. \u5176\u4ed6\u5e38\u7528\u6ce8\u89e3<\/h2>\n<ol>\n<li><strong>@Transactional<\/strong>\uff1a\u58f0\u660e\u4e8b\u52a1\u7ba1\u7406\u3002\u6807\u6ce8\u5728\u7c7b\u6216\u65b9\u6cd5\u4e0a\uff0c\u6307\u5b9a\u4e8b\u52a1\u7684\u4f20\u64ad\u884c\u4e3a\u3001\u9694\u79bb\u7ea7\u522b\u7b49\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">import org.springframework.stereotype.Service;\nimport org.springframework.transaction.annotation.Transactional;\n\n@Service\npublic class MyService {\n    @Transactional\n    public void performTransactionalOperation() {\n        \/\/ Database operations\n    }\n}<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>@Scheduled<\/strong>\uff1a\u58f0\u660e\u4e00\u4e2a\u65b9\u6cd5\u9700\u8981\u5b9a\u65f6\u6267\u884c\u3002\u6807\u6ce8\u5728\u65b9\u6cd5\u4e0a\uff0c\u5e76\u6307\u5b9a\u5b9a\u65f6\u6267\u884c\u7684\u89c4\u5219\uff08\u5982\u6bcf\u9694\u4e00\u5b9a\u65f6\u95f4\u6267\u884c\u4e00\u6b21\uff09\u3002<\/li>\n<\/ol>\n<pre><code class=\"java\">import org.springframework.scheduling.annotation.Scheduled;\nimport org.springframework.stereotype.Component;\n\n@Component\npublic class MyScheduledTask {\n    @Scheduled(fixedRate = 5000)\n    public void performTask() {\n        System.out.println(&quot;Task executed.&quot;);\n    }\n}<\/code><\/pre>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>Spring Boot \u4e2d\u7684\u6ce8\u89e3\u7528\u5f88\u591a\uff0c\u672c\u6587\u4e5f\u662f\u8d70\u9a6c\u89c2\u82b1\u7684\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u4e00\u4e0b Spring Boot \u4e2d\u7684\u5e38\u89c1\u6ce8\u89e3\u3002\u5f53\u7136\u8fd9\u4e9b\u6ce8\u89e3\u4e5f\u4e0d\u9700\u8981\u5168\u90e8\u8bb0\u4f4f\uff0c\u53ea\u9700\u6709\u4e00\u4e2a\u5927\u6982\u7684\u5370\u8c61\u5373\u53ef\uff0c\u7528\u7684\u65f6\u5019\u518d\u67e5\u5177\u4f53\u7684\u4f7f\u7528\u5c31\u53ef\u4ee5\u4e86\u3002\u6700\u540e\uff0c\u6b22\u8fce\u5c0f\u4f19\u4f34\u5728\u8bc4\u8bba\u533a\u8865\u5145\u548c\u53d1\u8868\u66f4\u591a\u7684\u5e38\u7528\u6ce8\u89e3\u3002<\/p>\n<blockquote><p>\u672c\u6587\u5df2\u6536\u5f55\u5230\u6211\u7684\u9762\u8bd5\u5c0f\u7ad9 <a href=\"https:\/\/link.segmentfault.com\/?enc=qNiVWjmLnYDIIavS7QXBqA%3D%3D.gElghYiR3FxW4Sggl4iVNuBFn7l%2BncsQvFBnYKrbXkI%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">www.javacn.site<\/a>\uff0c\u5176\u4e2d\u5305\u542b\u7684\u5185\u5bb9\u6709\uff1a\u5e76\u53d1\u7f16\u7a0b\u3001MySQL\u3001Redis\u3001Spring\u3001Spring MVC\u3001Spring Boot\u3001Spring Cloud\u3001MyBatis\u3001JVM\u3001\u8bbe\u8ba1\u6a21\u5f0f\u3001\u6d88\u606f\u961f\u5217\u7b49\u6a21\u5757\u3002<\/p><\/blockquote>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000045455625\">https:\/\/segmentfault.com\/a\/1190000045455625<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Boot \u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u6ce8\u89e3\uff0c\u7528\u4e8e\u7b80\u5316\u914d\u7f6e\u548c\u52a0\u901f\u7a0b\u5e8f\u5f00\u53d1\u3002 \u90a3\u4e48\u63a5\u4e0b\u6765\uff0c\u54b1\u4eec\u5c31\u4e00\u8d77\u6765\u770b\u4e0b Spri [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10020385","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10020385"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020385\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10020385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10020385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10020385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}