修改包名
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.orion.ops.launch;
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
|
||||
/**
|
||||
* application 启动类
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/19 16:55
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = {"com.orion.ops.launch", "com.orion.ops.module"})
|
||||
public class LaunchApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(LaunchApplication.class).run(args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.orion.ops.launch.config;
|
||||
|
||||
import com.orion.spring.SpringHolder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 应用配置类
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/20 10:34
|
||||
*/
|
||||
@Configuration
|
||||
public class ApplicationConfiguration {
|
||||
|
||||
/**
|
||||
* @return spring 容器工具类
|
||||
*/
|
||||
@Bean
|
||||
public SpringHolder.ApplicationContextAwareStore springHolderAware() {
|
||||
return new SpringHolder.ApplicationContextAwareStore();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.orion.ops.launch.controller;
|
||||
|
||||
import com.orion.ops.framework.common.annotation.RestWrapper;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/19 17:08
|
||||
*/
|
||||
@RestWrapper
|
||||
@RestController
|
||||
@RequestMapping("/server/bootstrap")
|
||||
public class BootstrapController {
|
||||
|
||||
@GetMapping("/health")
|
||||
public String health() {
|
||||
return "server ok";
|
||||
}
|
||||
|
||||
}
|
||||
14
orion-ops-launch/src/main/resources/application-dev.yaml
Normal file
14
orion-ops-launch/src/main/resources/application-dev.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
url: jdbc:mysql://127.0.0.1:3306/orion-ops-pro?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&autoReconnect=true
|
||||
username: root
|
||||
password: Data@123456
|
||||
initial-size: 0
|
||||
min-idle: 1
|
||||
max-active: 5
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
# 日志打印
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
28
orion-ops-launch/src/main/resources/application-prod.yaml
Normal file
28
orion-ops-launch/src/main/resources/application-prod.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
url: jdbc:mysql://127.0.0.1:3306/orion-ops-pro?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&autoReconnect=true
|
||||
username: root
|
||||
password: Data@123456
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接池数量
|
||||
min-idle: 5
|
||||
# 最大连接池数量
|
||||
max-active: 20
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: false
|
||||
swagger-ui:
|
||||
enabled: false
|
||||
|
||||
knife4j:
|
||||
enable: false
|
||||
107
orion-ops-launch/src/main/resources/application.yaml
Normal file
107
orion-ops-launch/src/main/resources/application.yaml
Normal file
@@ -0,0 +1,107 @@
|
||||
server:
|
||||
port: 9200
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: orion-ops-launch
|
||||
profiles:
|
||||
active: dev
|
||||
main:
|
||||
# 允许循环依赖
|
||||
allow-circular-references: true
|
||||
servlet:
|
||||
# 文件上传相关配置项
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 16MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 32MB
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
websocket:
|
||||
# 1MB
|
||||
binary-buffer-size: 1048576
|
||||
# 1MB
|
||||
text-buffer-size: 1048576
|
||||
# 30MIN
|
||||
session-idle-timeout: 1800000
|
||||
datasource:
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接池数量
|
||||
min-idle: 5
|
||||
# 最大连接池数量
|
||||
max-active: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
max-wait: 600000
|
||||
# 检测间隔
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 最小生存的时间
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# 最大生存的时间
|
||||
max-evictable-idle-time-millis: 900000
|
||||
validation-query: SELECT 1
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
login-username:
|
||||
login-password:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 800
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
mapper-locations: classpath*:mapper/*Mapper.xml
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: deleted
|
||||
logic-not-delete-value: 1
|
||||
logic-delete-value: 2
|
||||
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true
|
||||
path: /v3/api-docs
|
||||
swagger-ui:
|
||||
enabled: true
|
||||
path: /swagger-ui
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
show-extensions: true
|
||||
|
||||
knife4j:
|
||||
enable: true
|
||||
setting:
|
||||
language: zh_cn
|
||||
|
||||
orion:
|
||||
# 版本
|
||||
version: @revision@
|
||||
# api 信息
|
||||
api:
|
||||
# 公共api前缀
|
||||
prefix: /orion-api
|
||||
# 是否开启跨域
|
||||
cors: true
|
||||
# 文档配置
|
||||
swagger:
|
||||
title: orion-ops-pro 运维平台
|
||||
description: 一站式提供运维功能
|
||||
version: ${orion.version}
|
||||
url: https://github.com/lijiahangmax/orion-ops-pro
|
||||
email: ljh1553488six@139.com
|
||||
license: Apache-2.0
|
||||
license-url: https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE
|
||||
@@ -0,0 +1,5 @@
|
||||
### 心跳检测
|
||||
GET http://{{baseUrl}}/server/bootstrap/health
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
Reference in New Issue
Block a user