Commit 5274c301 authored by yuxiaodi's avatar yuxiaodi

init

parent 79919cab
{
"project": {
"name": "ruoyi",
"version": "1.0.0",
"description": "基于Spring Boot的后台管理系统"
},
"modules": [
"ruoyi-admin",
"ruoyi-common",
"ruoyi-framework",
"ruoyi-generator",
"ruoyi-party",
"ruoyi-quartz",
"ruoyi-system"
],
"build": {
"tool": "maven",
"command": "mvn clean package -DskipTests"
},
"test": {
"command": "mvn test"
},
"run": {
"module": "ruoyi-admin",
"command": "mvn spring-boot:run"
},
"env": {
"java.version": "11",
"maven.version": "3.6.3"
},
"resource": {
"path": "${RESOURCE_PATH}"
},
"database": {
"type": "mysql",
"version": "8.0"
},
"dependencies": [
"spring-boot-starter-web",
"spring-boot-starter-security",
"mybatis-spring-boot-starter",
"druid-spring-boot-starter"
],
"mapping_ports": {
"APP_PORT_1": 8080,
"APP_PORT_2": 8081,
"APP_PORT_3": 8082,
"APP_PORT_4": 8083
},
"deploy": [
{
"image_name": "ruoyi",
"app_access_entry": true,
"ports": [
{
"name": "APP_PORT_1",
"main_port": true,
"inner_access_env_key": "API_URL",
"open_access": true,
"open_access_env_key": "API_DOMAIN"
}
],
"docker_file_dir": "./",
"deploy_resources": {
"cpu_limit": 1,
"memory_limit": 2,
"storage_limit": 1
}
}
]
}
{}
\ No newline at end of file
{
"redis_server": {
"name": "redis私有库",
"top": "database",
"remark": "redis最新版本",
"config": {
"redis_host": "dev-ree-bf68b0-1757569414-redis.dev-org-447703-1749186738.svc.cluster.local",
"redis_port": "6379",
"redis_password": "Pp123123!",
"redis_database": "4",
"resource_entity_id": "dev-ree-bf68b0-1757569414",
"org_id": "dev-org-447703-1749186738",
"definition_code": "redis_server"
}
},
"mysql_server": {
"name": "mysql私有数据库",
"top": "database",
"remark": "mysql 5.7 数据库",
"config": {
"mysql_host": "dev-ree-82f9b8-1757550084-mysql.dev-org-447703-1749186738.svc.cluster.local",
"mysql_port": "3306",
"mysql_user": "root",
"mysql_password": "Pp123123!",
"mysql_database": "yichengstreet",
"resource_entity_id": "dev-ree-82f9b8-1757550084",
"org_id": "dev-org-447703-1749186738",
"definition_code": "mysql_server"
}
}
}
\ No newline at end of file
{
"maven.view": "flat"
}
\ No newline at end of file
...@@ -12,6 +12,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ...@@ -12,6 +12,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
chmod u+s /bin/ping chmod u+s /bin/ping
ENV LANG en_US.UTF-8 ENV LANG en_US.UTF-8
USER eazytec USER eazytec
EXPOSE 8080 EXPOSE 8000
ENV JVM_ARGS "-Duser.home=$HOME -Xms1024m -Xmx2048m" ENV JVM_ARGS "-Duser.home=$HOME -Xms1024m -Xmx2048m"
# Ruoyi 项目 Makefile
.PHONY: build clean test
# 项目模块
MODULES = ruoyi-admin ruoyi-common ruoyi-framework ruoyi-generator ruoyi-party ruoyi-quartz ruoyi-system
# 构建所有模块
build:
@echo "开始构建所有模块..."
@for module in $(MODULES); do \
echo "构建模块: $$module"; \
cd $$module && mvn -s /workspace/settings.xml clean package -DskipTests && cd ..; \
done
@echo "所有模块构建完成"
# 清理所有模块
clean:
@echo "开始清理所有模块..."
@for module in $(MODULES); do \
echo "清理模块: $$module"; \
cd $$module && mvn -s /workspace/settings.xml clean && cd ..; \
done
@echo "所有模块清理完成"
# 运行测试
test:
@echo "开始运行测试..."
@for module in $(MODULES); do \
echo "测试模块: $$module"; \
cd $$module && mvn -s /workspace/settings.xml test && cd ..; \
done
@echo "所有测试运行完成"
# 安装依赖
install:
@echo "开始安装所有模块依赖..."
@for module in $(MODULES); do \
echo "安装模块依赖: /workspace/$$module"; \
cd /workspace/$$module && mvn -s /workspace/settings.xml install -DskipTests && cd ..; \
done
@echo "所有模块依赖安装完成"
# 启动应用(依赖 install)
run:
@echo "启动 ruoyi-admin 应用..."
cd ruoyi-admin && mvn -s /workspace/settings.xml spring-boot:run
...@@ -188,29 +188,4 @@ ...@@ -188,29 +188,4 @@
</plugins> </plugins>
</build> </build>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project> </project>
\ No newline at end of file
...@@ -163,4 +163,20 @@ public class CommonController ...@@ -163,4 +163,20 @@ public class CommonController
log.error("下载文件失败", e); log.error("下载文件失败", e);
} }
} }
@GetMapping("/test")
public AjaxResult test(String query) throws Exception
{
try
{
AjaxResult ajax = AjaxResult.success();
ajax.put("query", query);
return ajax;
}
catch (Exception e)
{
return AjaxResult.error(e.getMessage());
}
}
} }
...@@ -16,7 +16,7 @@ ruoyi: ...@@ -16,7 +16,7 @@ ruoyi:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口,默认为8080 # 服务器的HTTP端口,默认为8080
port: 8080 port: 8000
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /
...@@ -73,9 +73,9 @@ spring: ...@@ -73,9 +73,9 @@ spring:
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址
host: redis-test.yx-street.svc.cluster.local host: 192.168.1.17
# 端口,默认为6379 # 端口,默认为6379
port: 6379 port: 32142
# 数据库索引 # 数据库索引
database: 4 database: 4
password: digital password: digital
...@@ -97,14 +97,14 @@ spring: ...@@ -97,14 +97,14 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://mysql-test.yx-street.svc.cluster.local:3306/yichengstreet?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 url: jdbc:mysql://192.168.1.17:31642/yichengstreet?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root username: root
password: P@44w0rd password: P@44w0rd
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: true enabled: false
url: jdbc:mysql://mysql-test.yx-street.svc.cluster.local:3306/yichengstreet-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 url: jdbc:mysql://192.168.1.17:31642/yichengstreet-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root username: root
password: P@44w0rd password: P@44w0rd
# 初始连接数 # 初始连接数
......
...@@ -117,7 +117,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -117,7 +117,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/api/party/**","/api/grid/screen/party/**").permitAll() .antMatchers("/api/party/**","/api/grid/screen/party/**").permitAll()
// 静态资源,可匿名访问downloadTemplate // 静态资源,可匿名访问downloadTemplate
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/doc.html").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/doc.html", "/common/test").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()
.and() .and()
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment