GithubHelp home page GithubHelp logo

alibaba / cloud-native-app-initializer Goto Github PK

View Code? Open in Web Editor NEW
230.0 6.0 82.0 1.67 MB

Cloud Native App Initializer is committed to providing developers with a simpler and more efficient project construction experience in the current cloud-native era.

Home Page: https://start.aliyun.com

License: Apache License 2.0

Java 57.79% Mustache 14.21% HTML 1.93% JavaScript 19.57% SCSS 6.48% Dockerfile 0.03%
initializer cloud-native-app-initializer cloud-native microservices

cloud-native-app-initializer's Introduction

English | 简体中文


Cloud Native App Initializer

Docs

Code structure

This is a Cloud Native App Initializer project derived from Spring Initializr, you can directly experience the function of the project through start.aliyun.com, which includes the following modules:

  • initializer-generator: Generate Project Modules, part of the basic code of start.spring.io is referenced in the io.spring.start.site directory.
  • initializer-page: Front page

Run from source

Please clone the project locally and make sure you have a Java 17 environment.

Build project

Since the front end is stored in the form of source code in this project, it needs to be compiled with yarn to become a resource file of the current project in order to be accessed correctly. Execute in the cloud-native-app-initializer directory:

mvn clean install

After this step is executed, compile and build the project module. Among them, the compiled front-end files will be copied to the initializer-page/target/classes/static directory

Run project

Enter the initializer-start module and execute the following command to start the application:

mvn spring-boot:run

In the browser, enter http://127.0.0.1:7001/bootstrap.html to use the initializer project for project bootstrap.

Run based on Docker

Before performing subsequent operations, please ensure that Docker has been installed in the relevant environment.

Pull image

Execute the following command on the local command line to pull the initializer project image:

docker pull registry.cn-hangzhou.aliyuncs.com/cloud-native-app-initializer/initializer:latest

Start the container

Execute the following command on the local command line to start the initializer container:

docker run -it -p 127.0.0.1:7001:7001 registry.cn-hangzhou.aliyuncs.com/cloud-native-app-initializer/initializer:latest

License

This project is a project under the Apache 2.0 license.

cloud-native-app-initializer's People

Contributors

alibaba-oss avatar kwtboom avatar ralf0131 avatar rishav1707 avatar steverao avatar theonefx avatar weixsun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-native-app-initializer's Issues

Could not build RocketMQ example code on Spring Boot 3.0

When I am trying to build it with Spring Boot 3.0 and Java 17, the following error has been raised:

~/Downloads/demo/src/main/java/com/example/demo/demos/rocketmq/producer/MySource.java:3:51
java: cannot find symbol
  symbol:   class Output
  location: package org.springframework.cloud.stream.annotation

It looks like in the latest Spring Cloud Stream 4.0.0 the annotation way has been deprecated.

Prioritize the use of dependModules when both dependModules and main are satisfied

CN:
我们正在定制一套适合自己的多模块的层次结构,发现当其中一个模块作为main 存在时即subModules: main: true,那么当前脚手架总是会依赖其他所有子模块,即使我定义了subModules: dependModules: "xxx"

我打算提一个pr(作为"enhancement"标签存在)以此来更改它两的优先级使用关系:当dependModulesmain 同时满足时,优先依赖使用dependModules配置的模块,而main作为第二序列使用。

DependencyOfDependencyDescriptionCustomizer 点击预览代码时报出异常

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
We recommend using English. If you are non-native English speaker, you can use the translation software.

Describe the bug
点击预览代码的时候提示异常,

To Reproduce
Steps to reproduce the behavior:
jdk 版本: 1.8

  1. 点击预览代码
  2. 看到 com.alibaba.initializer.generation.extension.dependency.DependencyOfDependencyDescriptionCustomizer#customize 中foreach报错

Expected behavior
正常的添加dependecines
Screenshots
If applicable, add screenshots to help explain your problem.

image

在这个getRequestedDependencies 的keyset进行for循环,在下面很明显看到有添加element的操作,导致map的modcount异常

Additional context
Add any other context about the problem here.
e.g. start.aliyun.com website or open source version

SpringBoot脚手架创建的boot项目打包出来的jar里没有BOOT-INF文件夹

  1. pom.xml问题:脚手架生成出来的项目的pom.xml里没有 parent 标签而是出现了dependencyManagement标签
  2. 直接打包可以打出来jar文件但是没有走boot的插件,而且jar包里没有BOOT-INF文件夹且无法启动

我尝试修改以后就可以了:

  1. 注释掉dependencyManagement标签,然后把parent标签加回来
  2. 把boot插件的多余配置删掉
org.springframework.boot spring-boot-maven-plugin ${spring-boot.version}

生成pom.xml文件格式不正确,有2个</project>

<pluginRepositories>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </pluginRepository>
</pluginRepositories>
这里会有2个错误,请问需要修改哪个代码?

no resources?

Why can't the resources directory be generated by using start.aliyun.com to generate the springboot project?
使用start.aliyun.com生成springboot工程为什么生成不了resources目录

sca-sentinel-dubbo-adapter is not found

Create a project from Spring boot 3.0 + Spring Cloud Alibaba including sca-sentinel-dubbo-adapter.
The project could not be built with the following errors:

For artifact {com.alibaba.csp:sentinel-apache-dubbo-adapter:null:jar}: The version cannot be empty.

DependencyOfDependencyDescriptionCustomizer 点击预览代码时报出异常

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
We recommend using English. If you are non-native English speaker, you can use the translation software.

Describe the bug
点击预览代码的时候提示异常,

To Reproduce
Steps to reproduce the behavior:
jdk 版本: 1.8

  1. 点击预览代码
  2. 看到 com.alibaba.initializer.generation.extension.dependency.DependencyOfDependencyDescriptionCustomizer#customize 中foreach报错

Expected behavior
正常的添加dependecines
Screenshots
If applicable, add screenshots to help explain your problem.

image

在这个getRequestedDependencies 的keyset进行for循环,在下面很明显看到有添加element的操作,导致map的modcount异常

Additional context
Add any other context about the problem here.
e.g. start.aliyun.com website or open source version

kotlin DSL suppot to new project using the gradle build tool

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
We recommend using English. If you are non-native English speaker, you can use the translation software.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

  • kotlin DSL suppot to new project using the gradle build tool

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

阿里云脚手架cola问题

阿里云脚手架的start为什么没有cola结构了,取消是基于什么原因考虑的,未来会加入吗

idea创建Spring Intilazer项目的时候访问http://start.aliyun.com会报Error parsing JSON response错误

啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊(128个啊)

是否支持扩展项目模板和在线配置查询和修改

如题,在start.aliyun.com,能看到示例代码,在开源版本中没有,后续这块是否支持自定义的项目模板
同时目前没有看到可以查看特定配置的地方,比如说特定mybatis-plus的配置,可以在代码生成之前显示最佳实践的配置,并支持在线修改,在生成代码,并且查看配置,可以单独显示特定依赖的配置,而不是看全局的配置

How to get all template variables

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
We recommend using English. If you are non-native English speaker, you can use the translation software.

How to get all variable information except the variable list provided below

平台默认支持一些模板变量,用于代码模板的编写:

变量 说明 实例值
appShotName 项目简短名称 app
applicationName 项目全名 Application
basePackage 项目的base包路径 com.theonef.testapp
version 项目版本 1.0
spring-boot.version Spring Boot 版本 2.2.6.RELEASE
java.version jdk 版本 1.8
artifactId 项目坐标 testapp
groupId 项目坐标 com.theonef
module 当前模块 web

[Proposal] Enhanced dependency ability about sample code

The original Dependency represend an building dependency, It's ok for original design.
But if we needed Dependency to manage the sample code, the original design would not meet the requirements
So, I prosoal that dependency should support these propertry:

  • codeOnly: If true, the dependency will not add any building system (gradle | maven) dependency, but only attach corresponding sample code to generated project. By virtue of this feature, we can manage sample code with group.
  • dependencies: If a simple code need require more dependency, We can use this feature to implement such requirement.
  • hide: Set true if you dont want this Dependency appears in the metadata api.

特性咨询

  1. 是否支持扩展第三方的依赖,比如说自己开发的starter,或者initializer中没有的依赖
  2. 代码自动生成能力

Support writing code to different modules

CN:
当选择一个dependency时,能够支持按照模块后缀名分别写入不同模块中,下面是一个简单说明示例:

    - name: Web
      content:
        - name: Spring Web
          id: web
          description: xxx
          archCfg:
            mvc:
              modules:
                web:
                  code: true
                service:
                  code: true
                start:
                  code: false
./
├── web
│   ├── java
│   │   └── Xxx.java.mustache
│   └── resources
│       ├── application.properties.mustache
│       └── log4j.properties.mustache
├── service
│   └── java
│       └── Yyy.java.mustache
└── start
    ├── java
    │   ├── Zzz.java.mustache
    └── resources
        ├── application.properties.mustache
        └── log4j.properties.mustache

结果:选择Spring Web 依赖时,会向web 和 service模块写入相应代码,start 模块因为code: false而不写入模版目录下的start 代码。

The project build failed because it could not download node.js

I am on a Mac M1 laptop and when I am trying to build the project if failed with the following error message.

[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for cloud-native-app-initializer 0.8:
[INFO]
[INFO] cloud-native-app-initializer ....................... SUCCESS [  0.003 s]
[INFO] initializer-page ................................... FAILURE [  2.818 s]
[INFO] initializer-generator .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.902 s
[INFO] Finished at: 2023-01-10T14:28:59+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.10.0:install-node-and-yarn (install node and yarn) on project initializer-page: Could not download Node.js: Got error code 404 from the server. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :initializer-page

What problem this project try to solve?

It seems that this project has no screenshot, no document, so what is the difference between this project and spring initializer? What problem this project try to solve?

By the way, this project could not run in Mac Apple Silicon, run mvn compile -P install-yarn got the following error:

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.10.0:install-node-and-yarn (install node and yarn) on project initializer-page: Could not download Node.js: Got error code 404 from the server. -> [Help 1]

And there is also no docker image for Mac Apple Silicon.

gradle构建报错

An exception occurred applying plugin request [id: 'org.springframework.boot', version: '2.6.11']
> Failed to apply plugin [id 'org.springframework.boot']
   > Spring Boot plugin requires Gradle 6.8.x, 6.9.x, or 7.x. The current version is Gradle 6.4.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.