Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Eladmin | 19,781 | 7 days ago | 42 | apache-2.0 | Java | |||||
项目基于 Spring Boot 2.1.0 、 Jpa、 Spring Security、redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由 | ||||||||||
Litemall | 17,912 | 2 months ago | 1 | April 25, 2020 | 27 | mit | Java | |||
又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端 + Vue用户移动端 | ||||||||||
Spring Boot Admin | 11,731 | 838 | 58 | 7 hours ago | 81 | September 16, 2022 | 33 | apache-2.0 | Java | |
Admin UI for administration of spring boot applications | ||||||||||
Newbee Mall | 10,077 | 6 days ago | gpl-3.0 | Java | ||||||
🔥 🎉newbee-mall是一套电商系统,包括基础版本(Spring Boot+Thymeleaf)、前后端分离版本(Spring Boot+Vue 3+Element-Plus+Vue-Router 4+Pinia+Vant 4) 、秒杀版本、Go语言版本、微服务版本(Spring Cloud Alibaba+Nacos+Sentinel+Seata+Spring Cloud Gateway+OpenFeign+ELK)。 前台商城系统包含首页门户、商品分类、新品上线、首页轮播、商品推荐、商品搜索、商品展示、购物车、订单结算、订单流程、个人订单管理、会员中心、帮助中心等模块。 后台管理系统包含数据面板、轮播图管理、商品管理、订单管理、会员管理、分类管理、设置等模块。 | ||||||||||
Spring Cloud Platform | 6,041 | 2 months ago | 14 | other | Java | |||||
🔥🔥🔥国内首个Spring Cloud微服务化RBAC的管理平台,核心采用Spring Boot 2.4、Spring Cloud 2020.0.0 & Alibaba,前端采用d2-admin中台框架。 🔝 🔝 记得上边点个star 关注更新 | ||||||||||
Lamp Cloud | 4,928 | a month ago | 4 | apache-2.0 | Java | |||||
lamp-cloud 基于Jdk11 + SpringCloud + SpringBoot 开发的微服务中后台快速开发平台,专注于多租户(SaaS架构)解决方案,亦可作为普通项目(非SaaS架构)的基础开发框架使用,目前已实现插拔式数据库隔离、SCHEMA隔离、字段隔离 等租户隔离方案。 | ||||||||||
Springboot Shiro Vue | 4,192 | 6 months ago | mit | Java | ||||||
提供一套基于Spring Boot-Shiro-Vue的权限管理思路.前后端都加以控制,做到按钮/接口级别的权限。(当前新版本已移除shiro依赖,简化了配置) | ||||||||||
Eladmin Web | 4,114 | 11 days ago | 1 | August 11, 2021 | 2 | apache-2.0 | Vue | |||
eladmin前端源码,项目基于 Spring Boot 2.1.0 、 Spring Boot Jpa、 Spring Security、Redis、Vue的前后端分离后台管理系统, 权限控制采用 RBAC,菜单动态路由 | ||||||||||
Light Task Scheduler | 2,963 | 8 | 1 | 8 months ago | 6 | March 06, 2017 | 128 | apache-2.0 | Java | |
Distributed Scheduled Job Framework | ||||||||||
Scm Biz Suite | 2,121 | 11 days ago | 9 | Java | ||||||
供应链中台系统基础版,集成零售管理, 电子商务, 供应链管理, 财务管理, 车队管理, 仓库管理, 人员管理, 产品管理, 订单管理, 会员管理, 连锁店管理, 加盟管理, 前端React/Ant Design, 后端Java Spring+自有开源框架,全面支持MySQL, PostgreSQL, 全面支持国产数据库南大通用GBase 8s,通过REST接口调用,前后端完全分离。 |
Monitor Python web apps using Spring Boot Admin.
Pyctuator supports Flask, FastAPI, aiohttp and Tornado. Django support is planned as well.
The following video shows a FastAPI web app being monitored and controled using Spring Boot Admin.
The complete example can be found in Advanced example.
Python 3.9+
Pyctuator has zero hard dependencies.
Install Pyctuator using pip: pip3 install pyctuator
Many Java shops use Spring Boot as their main web framework for developing microservices. These organizations often use Spring Actuator together with Spring Boot Admin to monitor their microservices' status, gain access to applications' state and configuration, manipulate log levels, etc.
While Spring Boot is suitable for many use-cases, it is very common for organizations to also have a couple of Python microservices, as Python is often more suitable for some types of applications. The most common examples are Data Science and Machine Learning applications.
Setting up a proper monitoring tool for these microservices is a complex task, and might not be justified for just a few Python microservices in a sea of Java microservices.
This is where Pyctuator comes in. It allows you to easily integrate your Python microservices into your existing Spring Boot Admin deployment.
Pyctuator is a partial Python implementation of the Spring Actuator API .
It currently supports the following Actuator features:
The examples below show a minimal integration of FastAPI, Flask and aiohttp applications with Pyctuator.
After installing Flask/FastAPI/aiohttp and Pyctuator, start by launching a local Spring Boot Admin instance:
docker run --rm -p 8080:8080 --add-host=host.docker.internal:host-gateway michayaak/spring-boot-admin:2.2.3-1
Then go to http://localhost:8080
to get to the web UI.
The following example is complete and should run as is.
from flask import Flask
from pyctuator.pyctuator import Pyctuator
app_name = "Flask App with Pyctuator"
app = Flask(app_name)
@app.route("/")
def hello():
return "Hello World!"
Pyctuator(
app,
app_name,
app_url="http://host.docker.internal:5000",
pyctuator_endpoint_url="http://host.docker.internal:5000/pyctuator",
registration_url="http://localhost:8080/instances"
)
app.run(debug=False, port=5000)
The application will automatically register with Spring Boot Admin upon start up.
Log in to the Spring Boot Admin UI at http://localhost:8080
to interact with the application.
The following example is complete and should run as is.
from fastapi import FastAPI
from uvicorn import Server
from uvicorn.config import Config
from pyctuator.pyctuator import Pyctuator
app_name = "FastAPI App with Pyctuator"
app = FastAPI(title=app_name)
@app.get("/")
def hello():
return "Hello World!"
Pyctuator(
app,
"FastAPI Pyctuator",
app_url="http://host.docker.internal:8000",
pyctuator_endpoint_url="http://host.docker.internal:8000/pyctuator",
registration_url="http://localhost:8080/instances"
)
Server(config=(Config(app=app, loop="asyncio"))).run()
The application will automatically register with Spring Boot Admin upon start up.
Log in to the Spring Boot Admin UI at http://localhost:8080
to interact with the application.
The following example is complete and should run as is.
from aiohttp import web
from pyctuator.pyctuator import Pyctuator
app = web.Application()
routes = web.RouteTableDef()
@routes.get("/")
def hello():
return web.Response(text="Hello World!")
Pyctuator(
app,
"aiohttp Pyctuator",
app_url="http://host.docker.internal:8888",
pyctuator_endpoint_url="http://host.docker.internal:8888/pyctuator",
registration_url="http://localhost:8080/instances"
)
app.add_routes(routes)
web.run_app(app, port=8888)
The application will automatically register with Spring Boot Admin upon start up.
Log in to the Spring Boot Admin UI at http://localhost:8080
to interact with the application.
When registering a service in Spring Boot Admin, note that:
app_url
and pyctuator_endpoint_url
should use host.docker.internal
as the url's host so Spring Boot Admin will be able to connect to the monitored service.pyctuator_endpoint_url
must be using the same host and port as app_url
.ssl.SSLContext
using the ssl_context
optional parameter of the Pyctuator
constructor.PYCTUATOR_REGISTRATION_NO_CERT
environment variable so Pyctuator will disable certificate validation when registering (and deregistering).The following sections are intended for advanced users who want to configure advanced Pyctuator features.
While Pyctuator only needs to know the application's name, we recommend that applications monitored by Spring Boot Admin will show additional build and git details. This becomes handy when scaling out a service to multiple instances by showing the version of each instance. To do so, you can provide additional build and git info using methods of the Pyctuator object:
pyctuator = Pyctuator(...) # arguments removed for brevity
pyctuator.set_build_info(
name="app",
version="1.3.1",
time=datetime.fromisoformat("2019-12-21T10:09:54.876091"),
)
pyctuator.set_git_info(
commit="7d4fef3",
time=datetime.fromisoformat("2019-12-24T14:18:32.123432"),
branch="origin/master",
)
Once you configure build and git info, you should see them in the Details tab of Spring Boot Admin:
In addition to adding build and git info, Pyctuator allows adding arbitrary application details to the "Info" section in SBA.
This is done by initializing the additional_app_info
parameter with an arbitrary dictionary.
For example, you can provide links to your application's metrics:
Pyctuator(
app,
"Flask Pyctuator",
app_url=f"http://172.18.0.1:5000",
pyctuator_endpoint_url=f"http://172.18.0.1:5000/pyctuator",
registration_url=f"http://localhost:8080/instances",
app_description="Demonstrate Spring Boot Admin Integration with Flask",
additional_app_info=dict(
serviceLinks=dict(
metrics="http://xyz/service/metrics"
),
podLinks=dict(
metrics=["http://xyz/pod/metrics/memory", "http://xyz/pod/metrics/cpu"]
)
)
)
This will result with the following Info page in SBA:
For services that use SQL database via SQLAlchemy, Pyctuator can easily monitor and expose the connection's health using the DbHealthProvider class as demonstrated below:
engine = create_engine("mysql+pymysql://root:[email protected]:3306")
pyctuator = Pyctuator(...) # arguments removed for brevity
pyctuator.register_health_provider(DbHealthProvider(engine))
Once you configure the health provider, you should see DB health info in the Details tab of Spring Boot Admin:
If your service is using Redis, Pyctuator can monitor the connection to Redis by simply initializing a RedisHealthProvider
:
r = redis.Redis()
pyctuator = Pyctuator(...) # arguments removed for brevity
pyctuator.register_health_provider(RedisHealthProvider(r))
Out of the box, Pyctuator exposes Python's environment variables to Spring Boot Admin.
In addition, an application may register an environment provider to provide additional configuration that should be exposed via Spring Boot Admin.
When the environment provider is called it should return a dictionary describing the environment. The returned dictionary is exposed to Spring Boot Admin.
Since Spring Boot Admin doesn't support hierarchical environment (only a flat key/value mapping), the provided environment is flattened as dot-delimited keys.
Pyctuator tries to hide secrets from being exposed to Spring Boot Admin by replacing the values of "suspicious" keys with ***.
Suspicious keys are keys that contain the words "secret", "password" and some forms of "key".
For example, if an application's configuration looks like this:
config = {
"a": "s1",
"b": {
"secret": "ha ha",
"c": 625,
},
"d": {
"e": True,
"f": "hello",
"g": {
"h": 123,
"i": "abcde"
}
}
}
An environment provider can be registered like so:
pyctuator.register_environment_provider("config", lambda: config)
Pyctuator can provide filesystem and memory metrics.
To enable these metrics, install psutil
Note that the psutil
dependency is optional and is only required if you want to enable filesystem and memory monitoring.
Pyctuator leverages Python's builtin logging
framework and allows controlling log levels at runtime.
Note that in order to control uvicorn's log level, you need to provide a logger object when instantiating it. For example:
myFastAPIServer = Server(
config=Config(
logger=logging.getLogger("uvi"),
app=app,
loop="asyncio"
)
)
Pyctuator supports registration with Spring Boot Admin that requires basic authentications. The credentials are provided when initializing the Pyctuator instance as follows:
# NOTE: Never include secrets in your code !!!
auth = BasicAuth(os.getenv("sba-username"), os.getenv("sba-password"))
Pyctuator(
app,
"Flask Pyctuator",
app_url="http://localhost:5000",
pyctuator_endpoint_url=f"http://localhost:5000/pyctuator",
registration_url=f"http://spring-boot-admin:8080/instances",
registration_auth=auth,
)
Since there are numerous standard approaches to protect an API, Pyctuator doesn't explicitly support any of them. Instead, Pyctuator allows to customize its integration with the web-framework. See the example in fastapi_with_authentication_example_app.py.
The examples
folder contains full blown Python projects that are built using Poetry.
To run these examples, you'll need to have Spring Boot Admin running in a local docker container. A Spring Boot Admin Docker image is available here.
Unless the example includes a docker-compose file, you'll need to start Spring Boot Admin using docker directly:
docker run --rm -p 8080:8080 --add-host=host.docker.internal:host-gateway michayaak/spring-boot-admin:2.2.3-1
(the docker image's tag represents the version of Spring Boot Admin, so if you need to use version 2.0.0
, use michayaak/spring-boot-admin:2.0.0
instead, note it accepts connections on port 8082).
The examples include
To set up a development environment, make sure you have Python 3.9 or newer installed, and run make bootstrap
.
Use make check
to run static analysis tools.
Use make test
to run tests.