Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scx567888/scx

✨ A Web rapid development framework
https://github.com/scx567888/scx

java scx vertx

Last synced: 26 days ago
JSON representation

✨ A Web rapid development framework

Awesome Lists containing this project

README

        


scx-logo




CI


maven-central


code-size


issues


license




Helidon


Jackson


Spring Framework


HikariCP


FreeMarker


Thumbnailator




Jasypt


MySQL Connector/J


Cron utils


SLF4J


Apache Log4j 2


TestNG

English | [简体中文](./README.zh-CN.md)

> A Web rapid development framework

## Maven

``` xml

cool.scx
scx-core
{version}

```

## Quick start

#### 1. Write your own module and run the main method .

``` java
import cool.scx.core.Scx;
import cool.scx.core.ScxModule;
import cool.scx.http.HttpMethod;
import cool.scx.web.annotation.ScxRoute;

// Note : Custom modules need extends ScxModule
// This @ScxRoute indicate this class needs to be scanned by WebHandler
@ScxRoute
public class YourModule extends ScxModule {

public static void main(String[] args) {
// Use Scx Builder, build and run project
Scx.builder()
.setMainClass(YourModule.class) // 1, The class of the Main method
.addModule(new YourModule()) // 2, Your own modules
.setArgs(args) // 3, External parameters
.run(); // 4, Build and run project
}

// This @ScxRoute indicate this method is a WebHandler
// The path is "" and the request method is GET
@ScxRoute(value = "", methods = HttpMethod.GET)
public String helloWorld() {
// The content that will be sent to the client
return "Hello World";
}

}
```

#### 2. Use your browser to access http://localhost:8080/ , you should see this .

```html
Hello World
```

For more information, see [docs](https://scx.cool/docs/scx/index.html)

## Stats

![Alt](https://repobeats.axiom.co/api/embed/7c4eddb6eff53274d58005e1fbe519b0807cbce3.svg "Repobeats analytics image")