SpringBoot项目打包为jar包

时间:2025-03-17 19:40:29
Microsoft Windows [版本 10.0.18362.959] (c) 2019 Microsoft Corporation。保留所有权利。 C:\Users\92895>D: D:\>cd D:\data_view\out\artifacts\data_view_jar D:\data_view\out\artifacts\data_view_jar>Java -jar data_view_jar Error: Unable to access jarfile data_view_jar D:\data_view\out\artifacts\data_view_jar>java -jar data_view_jar Error: Unable to access jarfile data_view_jar D:\data_view\out\artifacts\data_view_jar>java -jar data_view.jar _________ ____.__ __ \_ ___ \ | / \ / \ / \ \/ | \ \/\/ / \ \____/\__| |\ / \______ /\________| \__/\ / \/ \/ 2020-07-20 09:51:27.016 INFO 12564 --- [ restartedMain] com.dvms.DataViewApplication : Starting DataViewApplication on 4C501 with PID 12564 (D:\data_view\out\artifacts\data_view_jar\data_view.jar started by 92895 in D:\data_view\out\artifacts\data_view_jar) 2020-07-20 09:51:27.020 INFO 12564 --- [ restartedMain] com.dvms.DataViewApplication : No active profile set, falling back to default profiles: default 2020-07-20 09:51:27.068 INFO 12564 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2020-07-20 09:51:27.068 INFO 12564 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' 2020-07-20 09:51:28.817 INFO 12564 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2020-07-20 09:51:28.831 INFO 12564 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2020-07-20 09:51:28.832 INFO 12564 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.35] 2020-07-20 09:51:28.896 INFO 12564 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2020-07-20 09:51:28.896 INFO 12564 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1827 ms 2020-07-20 09:51:29.631 INFO 12564 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@56cf4f3a, org.springframework.security.web.context.SecurityContextPersistenceFilter@45e169c9, org.springframework.security.web.header.HeaderWriterFilter@26d4eefe, org.springframework.security.web.authentication.logout.LogoutFilter@f17fdd6, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@5f33f6b3, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@70ffa278, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@109a14b8, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@54857a49, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@423bad4c, org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter@7e8ca12a, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@3ee5e690, org.springframework.security.web.session.SessionManagementFilter@7139411a, org.springframework.security.web.access.ExceptionTranslationFilter@1ec9ee0a, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@bf4c490] 2020-07-20 09:51:29.711 INFO 12564 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2020-07-20 09:51:29.929 INFO 12564 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2020-07-20 09:51:29.967 INFO 12564 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2020-07-20 09:51:29.976 INFO 12564 --- [ restartedMain] com.dvms.DataViewApplication : Started DataViewApplication in 3.27 seconds (JVM running for 3.828) 2020-07-20 09:51:44.774 INFO 12564 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2020-07-20 09:51:44.775 INFO 12564 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2020-07-20 09:51:44.782 INFO 12564 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 5 ms 2020-07-20 09:51:56.052 INFO 12564 --- [nio-8080-exec-5] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} init