{"id":192,"date":"2023-08-21T14:51:43","date_gmt":"2023-08-11T12:44:13","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/index.php\/2023\/11\/30\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/"},"modified":"2025-08-01T02:10:36","modified_gmt":"2025-07-31T18:10:36","slug":"spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/","title":{"rendered":"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef"},"content":{"rendered":"<p>\u8fd9\u662f\u6587\u7ae0\u300aSpring Boot &#8211; \u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u7684\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u300b\u7684\u7b2c1\u90e8\u5206\uff08\u51712\u90e8\u5206\uff09\u3002<\/p>\n<p>\u5982\u679c\u4f60\u6b63\u5728\u9605\u8bfb\u8fd9\u7bc7\u6587\u7ae0\uff0c\u90a3\u4e48\u6211\u76f8\u4fe1\u4f60\u5728\u8fd0\u884cSpring Boot\u5e94\u7528\u7a0b\u5e8f\u65f6\u9047\u5230\u4e86\u201c\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u7a0b\u5e8f\u7c7b\u4e3aNONE\u7c7b\u578b\u7684\u6570\u636e\u5e93\u201d\u9519\u8bef\u3002\u4e0b\u9762\u7684\u56fe\u7247\u5c55\u793a\u4e86\u6211\u7684\u7b80\u5355Spring Boot\u5165\u95e8\u9879\u76ee\uff0c\u5728\u8fd0\u884cJUnit\u6d4b\u8bd5\u7528\u4f8b\u65f6\u9047\u5230\u4e86\u201c\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u7a0b\u5e8f\u7c7b\u4e3aNONE\u7c7b\u578b\u7684\u6570\u636e\u5e93\u201d\u9519\u8bef\u3002<\/p>\n<h2>\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u7a0b\u5e8f\u4e0e\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u5339\u914d<\/h2>\n<p>\u5f53\u4f60\u7684Spring Boot\u5e94\u7528\u7a0b\u5e8f\u672a\u914d\u7f6e\u6570\u636e\u6e90\u65f6\uff0c\u4f1a\u51fa\u73b0\u6b64\u9519\u8bef\u3002\u5f53\u8fd0\u884cSpring Boot\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u5b83\u4f1a\u5c1d\u8bd5\u914d\u7f6e\u6570\u636e\u6e90\uff0c\u5e76\u5728\u6ca1\u6709\u63d0\u4f9b\u914d\u7f6e\u65f6\u629b\u51fa\u6b64\u9519\u8bef\u4fe1\u606f\u3002\u4ee5\u4e0b\u662f\u6211\u5728Spring Boot\u521d\u59cb\u9879\u76ee\u4e2d\u4f7f\u7528\u7684\u7c7b\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.Olivia.spring;\r\n\r\nimport org.springframework.boot.SpringApplication;\r\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\r\n\r\n@SpringBootApplication\r\npublic class SpringBatchHelloWorldApplication {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tSpringApplication.run(SpringBatchHelloWorldApplication.class, args);\r\n\t}\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>package com.Olivia.spring;\r\n\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\nimport org.springframework.boot.test.context.SpringBootTest;\r\nimport org.springframework.test.context.junit4.SpringRunner;\r\n\r\n@RunWith(SpringRunner.class)\r\n@SpringBootTest\r\npublic class SpringBatchHelloWorldApplicationTests {\r\n\r\n\t@Test\r\n\tpublic void contextLoads() {\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u6211\u7684<code>application.properties<\/code>\u6587\u4ef6\u662f\u7a7a\u7684\u3002\u73b0\u5728\u5f53\u6211\u6267\u884cJUnit\u7c7b\u65f6\uff0c\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\u3002<\/p>\n<pre class=\"post-pre\"><code>11:42:49.460 [main] DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.469 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]\r\n11:42:49.474 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]\r\n11:42:49.486 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]\r\n11:42:49.495 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests], using SpringBootContextLoader\r\n11:42:49.498 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]: class path resource [com\/scdev\/spring\/SpringBatchHelloWorldApplicationTests-context.xml] does not exist\r\n11:42:49.498 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]: class path resource [com\/scdev\/spring\/SpringBatchHelloWorldApplicationTestsContext.groovy] does not exist\r\n11:42:49.499 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]: no resource found for suffixes {-context.xml, Context.groovy}.\r\n11:42:49.499 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]: SpringBatchHelloWorldApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration.\r\n11:42:49.532 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.539 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence\r\n11:42:49.540 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence\r\n11:42:49.540 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]\r\n11:42:49.547 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Resolved classpath location [com\/scdev\/spring\/] to resources [URL [file:\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/test-classes\/com\/scdev\/spring\/], URL [file:\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/classes\/com\/scdev\/spring\/]]\r\n11:42:49.548 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/test-classes\/com\/scdev\/spring]\r\n11:42:49.548 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Searching directory [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/test-classes\/com\/scdev\/spring] for files matching pattern [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/test-classes\/com\/scdev\/spring\/*.class]\r\n11:42:49.551 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/classes\/com\/scdev\/spring]\r\n11:42:49.551 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Searching directory [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/classes\/com\/scdev\/spring] for files matching pattern [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/classes\/com\/scdev\/spring\/*.class]\r\n11:42:49.551 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Resolved location pattern [classpath*:com\/scdev\/spring\/*.class] to resources [file [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/test-classes\/com\/scdev\/spring\/SpringBatchHelloWorldApplicationTests.class], file [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/classes\/com\/scdev\/spring\/SpringBatchHelloWorldApplication.class]]\r\n11:42:49.589 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [\/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld\/target\/classes\/com\/scdev\/spring\/SpringBatchHelloWorldApplication.class]\r\n11:42:49.590 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration com.Olivia.spring.SpringBatchHelloWorldApplication for test class com.Olivia.spring.SpringBatchHelloWorldApplicationTests\r\n11:42:49.592 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]: using defaults.\r\n11:42:49.597 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF\/spring.factories]: [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]\r\n11:42:49.612 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Could not instantiate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener]. Specify custom listener classes or make the default listener classes (and their required dependencies) available. Offending class: [javax\/servlet\/ServletContext]\r\n11:42:49.612 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@587d1d39, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@58c1670b, org.springframework.test.context.support.DirtiesContextTestExecutionListener@6b57696f, org.springframework.test.context.transaction.TransactionalTestExecutionListener@5bb21b69, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@6b9651f3, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@38bc8ab5, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@687080dc, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@23d2a7e8, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@7a9273a8, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@26a7b76d, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@4abdb505]\r\n11:42:49.613 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.614 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.623 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.623 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.624 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.624 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.624 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.624 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.627 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@69b0fd6f testClass = SpringBatchHelloWorldApplicationTests, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [MergedContextConfiguration@757942a1 testClass = SpringBatchHelloWorldApplicationTests, locations = '{}', classes = '{class com.Olivia.spring.SpringBatchHelloWorldApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.SpringBootTestContextCustomizer@6ea12c19, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@174d20a, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@4f933fd1], contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]], class annotated with @DirtiesContext [false] with mode [null].\r\n11:42:49.627 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.627 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.Olivia.spring.SpringBatchHelloWorldApplicationTests]\r\n11:42:49.628 [main] DEBUG org.springframework.test.context.support.DependencyInjectionTestExecutionListener - Performing dependency injection for test context [[DefaultTestContext@69b0fd6f testClass = SpringBatchHelloWorldApplicationTests, testInstance = com.Olivia.spring.SpringBatchHelloWorldApplicationTests@b7dd107, testMethod = [null], testException = [null], mergedContextConfiguration = [MergedContextConfiguration@757942a1 testClass = SpringBatchHelloWorldApplicationTests, locations = '{}', classes = '{class com.Olivia.spring.SpringBatchHelloWorldApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.SpringBootTestContextCustomizer@6ea12c19, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@174d20a, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@4f933fd1], contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]]].\r\n11:42:49.676 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence\r\n11:42:49.676 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence\r\n11:42:49.676 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]\r\n11:42:49.677 [main] DEBUG org.springframework.core.env.MutablePropertySources - Adding [inline] PropertySource with highest search precedence\r\n11:42:49.681 [main] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true, server.port=-1}\r\n11:42:49.681 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [Inlined Test Properties] PropertySource with highest search precedence\r\n\r\n  .   ____          _            __ _ _\r\n \/\\ \/ ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\r\n( ( )\\___ | '_ | '_| | '_ \\\/ _` | \\ \\ \\ \\\r\n \\\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\r\n  '  |____| .__|_|_|_|_| |_\\__, | \/ \/ \/ \/\r\n =========|_|==============|___\/=\/_\/_\/_\/\r\n :: Spring Boot ::        (v1.5.1.RELEASE)\r\n\r\n2017-03-04 11:42:49.876  INFO 51131 --- [           main] .s.SpringBatchHelloWorldApplicationTests : Starting SpringBatchHelloWorldApplicationTests on scdev.local with PID 51131 (started by scdev in \/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld)\r\n2017-03-04 11:42:49.877  INFO 51131 --- [           main] .s.SpringBatchHelloWorldApplicationTests : No active profile set, falling back to default profiles: default\r\n2017-03-04 11:42:49.902  INFO 51131 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@59474f18: startup date [Sat Mar 04 11:42:49 IST 2017]; root of context hierarchy\r\n2017-03-04 11:42:50.311  WARN 51131 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org\/springframework\/boot\/autoconfigure\/jdbc\/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).\r\n2017-03-04 11:42:50.318  INFO 51131 --- [           main] utoConfigurationReportLoggingInitializer :\r\n\r\nError starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.\r\n2017-03-04 11:42:50.322 ERROR 51131 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :\r\n\r\n***************************\r\nAPPLICATION FAILED TO START\r\n***************************\r\n\r\nDescription:\r\n\r\nCannot determine embedded database driver class for database type NONE\r\n\r\nAction:\r\n\r\nIf you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).\r\n\r\n\r\n  .   ____          _            __ _ _\r\n \/\\ \/ ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\r\n( ( )\\___ | '_ | '_| | '_ \\\/ _` | \\ \\ \\ \\\r\n \\\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\r\n  '  |____| .__|_|_|_|_| |_\\__, | \/ \/ \/ \/\r\n =========|_|==============|___\/=\/_\/_\/_\/\r\n :: Spring Boot ::        (v1.5.1.RELEASE)\r\n\r\n2017-03-04 11:42:50.347  INFO 51131 --- [           main] .s.SpringBatchHelloWorldApplicationTests : Starting SpringBatchHelloWorldApplicationTests on scdev.local with PID 51131 (started by scdev in \/Users\/scdev\/CODE\/hackathon\/SpringBatchHelloWorld)\r\n2017-03-04 11:42:50.348  INFO 51131 --- [           main] .s.SpringBatchHelloWorldApplicationTests : No active profile set, falling back to default profiles: default\r\n2017-03-04 11:42:50.349  INFO 51131 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2a448449: startup date [Sat Mar 04 11:42:50 IST 2017]; root of context hierarchy\r\n2017-03-04 11:42:50.475  WARN 51131 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org\/springframework\/boot\/autoconfigure\/jdbc\/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).\r\n2017-03-04 11:42:50.477  INFO 51131 --- [           main] utoConfigurationReportLoggingInitializer :\r\n\r\nError starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.\r\n2017-03-04 11:42:50.479 ERROR 51131 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :\r\n\r\n***************************\r\nAPPLICATION FAILED TO START\r\n***************************\r\n\r\nDescription:\r\n\r\nCannot determine embedded database driver class for database type NONE\r\n\r\nAction:\r\n\r\nIf you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).\r\n\r\n2017-03-04 11:42:50.486 ERROR 51131 --- [           main] o.s.test.context.TestContextManager      : Caught exception while allowing TestExecutionListener [org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@58c1670b] to prepare test instance [com.Olivia.spring.SpringBatchHelloWorldApplicationTests@b7dd107]\r\n\r\njava.lang.IllegalStateException: Failed to load ApplicationContext\r\n\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) ~[spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:47) ~[spring-boot-test-autoconfigure-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230) ~[spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12]\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12]\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12]\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12]\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12]\r\n\tat org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191) [spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) [.cp\/:na]\r\n\tat org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp\/:na]\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) [.cp\/:na]\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) [.cp\/:na]\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) [.cp\/:na]\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) [.cp\/:na]\r\nCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org\/springframework\/boot\/autoconfigure\/jdbc\/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).\r\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:120) ~[spring-boot-test-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) ~[spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) ~[spring-test-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\t... 24 common frames omitted\r\nCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).\r\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\t... 41 common frames omitted\r\nCaused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).\r\n\tat org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:246) ~[spring-boot-autoconfigure-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:183) ~[spring-boot-autoconfigure-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:42) ~[spring-boot-autoconfigure-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Tomcat.dataSource(DataSourceConfiguration.java:56) ~[spring-boot-autoconfigure-1.5.1.RELEASE.jar:1.5.1.RELEASE]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_73]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_73]\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_73]\r\n\tat java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_73]\r\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]\r\n\t... 42 common frames omitted\r\n<\/code><\/pre>\n<h3>\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u7a0b\u5e8f\u7c7b\u7684\u4fee\u590d\u65b9\u6cd5\u3002<\/h3>\n<p>\u8fd9\u662f\u6587\u7ae0\u300aSpring Boot &#8211; \u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u7684\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u300b\u7684\u7b2c2\u90e8\u5206\uff08\u51712\u90e8\u5206\uff09\u3002<\/p>\n<p>\u6b63\u5982\u60a8\u6240\u89c1\uff0c\u6211\u7684Java\u7c7b\u6587\u4ef6\u4e2d\u6ca1\u6709\u5185\u5bb9\uff0c\u56e0\u6b64\u9519\u8bef\u5e94\u8be5\u4e0eSpring Boot\u6709\u5173\u3002\u6211\u53d1\u73b0\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<ol>\n<li>\u5728Spring Boot\u5e94\u7528\u7a0b\u5e8f\u7c7b\u4e2d\u6392\u9664\u81ea\u52a8\u914d\u7f6e\u7684\u6570\u636e\u6e90\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u4ee3\u7801\u4e2d\u7684<code>@EnableAutoConfiguration<\/code>\u6ce8\u89e3\u6765\u5b9e\u73b0\u6b64\u64cd\u4f5c\u3002<\/li>\n<\/ol>\n<pre><code>package com.Olivia.spring;\r\n\r\nimport org.springframework.boot.SpringApplication;\r\nimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;\r\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\r\nimport org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;\r\n\r\n@SpringBootApplication\r\n@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})\r\npublic class SpringBatchHelloWorldApplication {\r\n\r\n    public static void main(String[] args) {\r\n        SpringApplication.run(SpringBatchHelloWorldApplication.class, args);\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u914d\u7f6e\uff0cJUnit\u6d4b\u8bd5\u7528\u4f8b\u6210\u529f\u6267\u884c\uff0c\u4e0d\u518d\u51fa\u73b0\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u7684\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u7a0b\u5e8f\u7c7b\u201d\u9519\u8bef\u3002<\/p>\n<p>\u53e6\u4e00\u79cd\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u65b9\u6cd5\u662f\u5728<code>application.properties<\/code>\u6587\u4ef6\u4e2d\u63d0\u4f9b<code>spring.datasource.url<\/code>\u3002\u5c3d\u7ba1\u6211\u6ca1\u6709\u63d0\u4f9b\u4efb\u4f55\u6570\u636e\u5e93\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u4f46\u8fd9\u4e2a\u65b9\u6cd5\u5bf9\u6211\u6709\u6548\u3002<\/p>\n<pre><code>spring.datasource.url=jdbc:mysql:\/\/localhost\/Test_DB\r\n<\/code><\/pre>\n<p>\u4fee\u590d\u4e86Spring Boot\u6570\u636e\u6e90\u9519\u8bef\uff0c\u5e0c\u671b\u8fd9\u4e9b\u4fee\u590d\u63aa\u65bd\u80fd\u5e2e\u52a9\u60a8\u89e3\u51b3Spring Boot\u5e94\u7528\u7a0b\u5e8f\u7684\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u6587\u7ae0\u300aSpring Boot &#8211; \u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u7684\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u300b\u7684\u7b2c1\u90e8 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[774,768,772,775,773],"class_list":["post-192","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-none","tag-spring-boot","tag-772","tag-775","tag-773"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u6df1\u5165\u89e3\u6790Spring Boot\u5e94\u7528\u4e2d\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u7684\u5e38\u89c1\u95ee\u9898\u3002\u672c\u6559\u7a0b\u63d0\u4f9b\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\u3001\u914d\u7f6e\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u89e3\u51b3Spring Boot\u6570\u636e\u5e93\u8fde\u63a5\u96be\u9898\uff0c\u786e\u4fdd\u5f00\u53d1\u6d41\u7a0b\u987a\u7545\u3002\" \/>\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.silicloud.com\/zh\/blog\/spring-boot-\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u7684\u6570\u636e\u5e93\u7c7b\u578b\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef\" \/>\n<meta property=\"og:description\" content=\"\u6df1\u5165\u89e3\u6790Spring Boot\u5e94\u7528\u4e2d\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u7684\u5e38\u89c1\u95ee\u9898\u3002\u672c\u6559\u7a0b\u63d0\u4f9b\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\u3001\u914d\u7f6e\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u89e3\u51b3Spring Boot\u6570\u636e\u5e93\u8fde\u63a5\u96be\u9898\uff0c\u786e\u4fdd\u5f00\u53d1\u6d41\u7a0b\u987a\u7545\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u7684\u6570\u636e\u5e93\u7c7b\u578b\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-11T12:44:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T18:10:36+00:00\" \/>\n<meta name=\"author\" content=\"\u96c5, \u609f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u96c5, \u609f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/\",\"name\":\"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-08-11T12:44:13+00:00\",\"dateModified\":\"2025-07-31T18:10:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\"},\"description\":\"\u6df1\u5165\u89e3\u6790Spring Boot\u5e94\u7528\u4e2d\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u7684\u5e38\u89c1\u95ee\u9898\u3002\u672c\u6559\u7a0b\u63d0\u4f9b\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\u3001\u914d\u7f6e\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u89e3\u51b3Spring Boot\u6570\u636e\u5e93\u8fde\u63a5\u96be\u9898\uff0c\u786e\u4fdd\u5f00\u53d1\u6d41\u7a0b\u987a\u7545\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\",\"name\":\"\u96c5, \u609f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"caption\":\"\u96c5, \u609f\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef - Blog - Silicon Cloud","description":"\u6df1\u5165\u89e3\u6790Spring Boot\u5e94\u7528\u4e2d\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u7684\u5e38\u89c1\u95ee\u9898\u3002\u672c\u6559\u7a0b\u63d0\u4f9b\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\u3001\u914d\u7f6e\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u89e3\u51b3Spring Boot\u6570\u636e\u5e93\u8fde\u63a5\u96be\u9898\uff0c\u786e\u4fdd\u5f00\u53d1\u6d41\u7a0b\u987a\u7545\u3002","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.silicloud.com\/zh\/blog\/spring-boot-\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u7684\u6570\u636e\u5e93\u7c7b\u578b\/","og_locale":"zh_CN","og_type":"article","og_title":"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef","og_description":"\u6df1\u5165\u89e3\u6790Spring Boot\u5e94\u7528\u4e2d\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u7684\u5e38\u89c1\u95ee\u9898\u3002\u672c\u6559\u7a0b\u63d0\u4f9b\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\u3001\u914d\u7f6e\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u89e3\u51b3Spring Boot\u6570\u636e\u5e93\u8fde\u63a5\u96be\u9898\uff0c\u786e\u4fdd\u5f00\u53d1\u6d41\u7a0b\u987a\u7545\u3002","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-\u65e0\u6cd5\u786e\u5b9a\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u7684\u6570\u636e\u5e93\u7c7b\u578b\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-08-11T12:44:13+00:00","article_modified_time":"2025-07-31T18:10:36+00:00","author":"\u96c5, \u609f","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u96c5, \u609f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/","name":"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-08-11T12:44:13+00:00","dateModified":"2025-07-31T18:10:36+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6"},"description":"\u6df1\u5165\u89e3\u6790Spring Boot\u5e94\u7528\u4e2d\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u7684\u5e38\u89c1\u95ee\u9898\u3002\u672c\u6559\u7a0b\u63d0\u4f9b\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\u3001\u914d\u7f6e\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u89e3\u51b3Spring Boot\u6570\u636e\u5e93\u8fde\u63a5\u96be\u9898\uff0c\u786e\u4fdd\u5f00\u53d1\u6d41\u7a0b\u987a\u7545\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Spring Boot \u5d4c\u5165\u5f0f\u6570\u636e\u5e93\u9a71\u52a8\u5668\u7c7b\uff1a\u89e3\u51b3\u201c\u65e0\u6cd5\u786e\u5b9a\u6570\u636e\u5e93\u7c7b\u578b\u4e3aNONE\u201d\u9519\u8bef"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6","name":"\u96c5, \u609f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","caption":"\u96c5, \u609f"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/spring-boot-%e6%97%a0%e6%b3%95%e7%a1%ae%e5%ae%9a%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a9%b1%e5%8a%a8%e5%99%a8%e7%b1%bb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b1%bb%e5%9e%8b\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":109671,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/192\/revisions\/109671"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}