# colat-micse **Repository Path**: glorious-youth/colat-micse ## Basic Information - **Project Name**: colat-micse - **Description**: 微服务开发项目基本框架 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-01-08 - **Last Updated**: 2024-01-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # colat-micse # Apache License 2.0 协议说明 Apache License 2.0 :商业软件最爱, 主要条件是要求保留原始版权和许可声明。同时向贡献者明确授予专利权。使用者可以自由修改,进行商业使用,大型项目可以不同的条款分发,没有开源要求,修改源代码需要记录变更。 #### 介绍 微服务开发项目基本框架 #### nacos 注册中心搭建 nacos-server 下载:https://github.com/alibaba/nacos/releases 下载:`nacos-server-2.2.3.zip` https://objects.githubusercontent.com/github-production-release-asset-2e65be/137451403/6c4fd4b7-3b7b-43f4-ac30-228a6ce9e7c9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240109T055929Z&X-Amz-Expires=300&X-Amz-Signature=6ea81830ccc7d54162e59305d0f6c74c63aa65e176b8933e4e9b0ffb492af5ce&X-Amz-SignedHeaders=host&actor_id=56667263&key_id=0&repo_id=137451403&response-content-disposition=attachment%3B%20filename%3Dnacos-server-2.2.3.zip&response-content-type=application%2Foctet-stream 选择的版本:`2.2.3 (May 25th, 2023) Latest` nacos 使用mysql 在解压出的nacos文件夹中进入`conf/application.properties`中修改 ```properties # 打开下面的注释,配置mysql连接信息 spring.datasource.platform=mysql spring.sql.init.platform=mysql db.num=1 db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC db.user.0=root db.password.0=root ``` 如需修改端口,则修改以下配置 ```properties server.servlet.contextPath=/nacos server.error.include-message=ALWAYS server.port=8848 ``` 创建nacos使用的数据库 ```mysql create database `nacos` character set utf8mb4 collate utf8mb4_general_ci; use `nacos`; ``` 然后执行`conf/mysql-schema.sql`文件中的sql创建数据库表 启动nacos-server ```shell startup.cmd -m standalone ``` 出现:`Nacos started successfully`表示启动成功,可以通过 logo旁边的 ` Console: http://192.168.56.1:8848/nacos/index.html`地址进行访问 ```shell D:\program\devlop\nacos\bin>startup.cmd -m standalone "nacos is starting with standalone" ,--. ,--.'| ,--,: : | Nacos 2.2.3 ,`--.'`| ' : ,---. Running in stand alone mode, All function modules | : : | | ' ,'\ .--.--. Port: 8848 : | \ | : ,--.--. ,---. / / | / / ' Pid: 3676 | : ' '; | / \ / \. ; ,. :| : /`./ Console: http://192.168.56.1:8848/nacos/index.html ' ' ;. ;.--. .-. | / / '' | |: :| : ;_ | | | \ | \__\/: . .. ' / ' | .; : \ \ `. https://nacos.io ' : | ; .' ," .--.; |' ; :__| : | `----. \ | | '`--' / / ,. |' | '.'|\ \ / / /`--' / ' : | ; : .' \ : : `----' '--'. / ; |.' | , .-./\ \ / `--'---' '---' `--`---' `----' 2023-10-26 09:38:49,087 INFO Tomcat initialized with port(s): 8848 (http) 2023-10-26 09:38:49,211 INFO Root WebApplicationContext: initialization completed in 2676 ms 2023-10-26 09:38:52,204 INFO Adding welcome page: class path resource [static/index.html] 2023-10-26 09:38:52,772 WARN You are asking Spring Security to ignore Ant [pattern='/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead. 2023-10-26 09:38:52,773 INFO Will not secure Ant [pattern='/**'] 2023-10-26 09:38:52,801 INFO Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@724f138e, org.springframework.security.web.context.SecurityContextPersistenceFilter@142eef62, org.springframework.security.web.header.HeaderWriterFilter@3bffddff, org.springframework.security.web.csrf.CsrfFilter@5471388b, org.springframework.security.web.authentication.logout.LogoutFilter@f415a95, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5990e6c5, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@35d6ca49, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@37eeec90, org.springframework.security.web.session.SessionManagementFilter@50687efb, org.springframework.security.web.access.ExceptionTranslationFilter@1601e47] 2023-10-26 09:38:52,835 INFO Exposing 1 endpoint(s) beneath base path '/actuator' 2023-10-26 09:38:52,884 INFO Tomcat started on port(s): 8848 (http) with context path '/nacos' 2023-10-26 09:38:52,907 INFO `Nacos started successfully` in stand alone mode. use external storage ```