Python 官方文档:入门教程 => 点击学习
目录正文启动类设置单机启动启动输出查看控制台正文 最近在学习Nacos,通过调式源码查看服务注册和发现流程和原理,本地部署naos源码需要一定的步骤,本文主要做nacos源码部署。
最近在学习Nacos
,通过调式源码查看服务注册和发现流程和原理,本地部署naos
源码需要一定的步骤,本文主要做nacos
源码部署。
nacos版本:2.1.1
从GitHub上下载源码到本地,下载下图的源码包,
解压后用idea
打开源码,com.alibaba.nacos.consistency.entity
报红错误:
解决com.alibaba.nacos.consistency.entity
报红问题,编译总项目。在目录nacos-2.1.1
打开终端编译整个项目:
mvn compile
复制代码
找到console
项目中的Nacos
启动类。
启动类配置VM options
添加参数,设置成单机启动:
-Dnacos.standalone=true
复制代码
有以下输出,说明项目启动成功:
,--.
,--.'|
,--,: : | Nacos
,`--.'`| ' : ,---. Running in stand alone mode, All function modules
| : : | | ' ,'\ .--.--. Port: 8848
: | \ | : ,--.--. ,---. / / | / / ' Pid: 7184
| : ' '; | / \ / \. ; ,. :| : /`./ Console: Http://192.168.3.181:8848/nacos/index.html
' ' ;. ;.--. .-. | / / '' | |: :| : ;_
| | | \ | \__\/: . .. ' / ' | .; : \ \ `. https://nacos.io
' : | ; .' ," .--.; |' ; :__| : | `----. \
| | '`--' / / ,. |' | '.'|\ \ / / /`--' /
' : | ; : .' \ : : `----' '--'. /
; |.' | , .-./\ \ / `--'---'
'---' `--`---' `----'
2023-01-11 11:20:45.576 INFO 7184 --- [ main] o.s.b.w.embedded.Tomcat.TomcatWEBServer : Tomcat initialized with port(s): 8848 (http)
2023-01-11 11:20:45.716 INFO 7184 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1964 ms
2023-01-11 11:20:48.151 INFO 7184 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
2023-01-11 11:20:48.402 WARN 7184 --- [ main] o.s.s.c.a.web.builders.WebSecurity : You are asking spring Security to ignore Ant [pattern='/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2023-01-11 11:20:48.402 INFO 7184 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will not secure Ant [pattern='/**']
2023-01-11 11:20:48.418 INFO 7184 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@637c8632, org.springframework.security.web.context.SecurityContextPersistenceFilter@7c4a5ef2, org.springframework.security.web.header.HeaderWriterFilter@3055f310, org.springframework.security.web.csrf.CsrfFilter@7901a5ab, org.springframework.security.web.authentication.loGout.LogoutFilter@7a2fd94c, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@34d3409d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2f64f99f, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@156eeff1, org.springframework.security.web.session.SessionManagementFilter@7d7c05fa, org.springframework.security.web.access.ExceptionTranslationFilter@288b8663]
2023-01-11 11:20:48.433 INFO 7184 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator'
2023-01-11 11:20:48.465 INFO 7184 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8848 (http) with context path '/nacos'
2023-01-11 11:20:48.480 INFO 7184 --- [ main] c.a.n.c.l.StartingApplicationListener : Nacos started successfully in stand alone mode. use embedded storage
2023-01-11 11:20:48.752 INFO 7184 --- [)-192.168.3.181] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2023-01-11 11:20:48.752 INFO 7184 --- [)-192.168.3.181] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
复制代码
请求http://127.0.0.1:8848/nacos
,查看控制台。
以上就是部署Nacos的源码环境搭建过程的详细内容,更多关于Nacos源码部署环境搭建的资料请关注编程网其它相关文章!
--结束END--
本文标题: 部署Nacos的源码环境搭建过程
本文链接: https://lsjlt.com/news/195355.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0