commit 616c2b6e1844a42cfa6c19468430b3c56b9e83c0 Author: linfso Date: Fri Jul 11 14:51:02 2025 +0800 init diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f1ae66f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM java:8 +MAINTAINER linfso + +ENV TZ="Asia/Shanghai" + +RUN mkdir -p /opt/logs +RUN mkdir -p /logs + +ADD config/app.properties /opt/config/app.properties +ADD config.properties /opt/config.properties +ADD logback-spring.xml /opt/logback-spring.xml + +ADD emis-api-server.jar /opt/app.jar + +WORKDIR /opt + +EXPOSE 11088 + +ENTRYPOINT ["java","-jar","-Duser.timezone=Asia/Shanghai","/opt/app.jar"] + diff --git a/api-backend.iml b/api-backend.iml new file mode 100644 index 0000000..f409c0e --- /dev/null +++ b/api-backend.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..6a09cc8 --- /dev/null +++ b/build.sh @@ -0,0 +1,13 @@ +rm -rf emis-api-server/pub +mkdir emis-api-server/pub + +rm -rf pub +mkdir pub + +mvn clean package -Dmaven.test.skip=true + +cp -rf emis-api-server/pub/* ./pub/ + +# docker k8s +cp Dockerfile ./pub/ +cp docker_build.sh ./pub/ diff --git a/config.properties b/config.properties new file mode 100644 index 0000000..12c2f76 --- /dev/null +++ b/config.properties @@ -0,0 +1 @@ +config.file=classpath:/application_local.yml,config/app.properties diff --git a/config/app.properties b/config/app.properties new file mode 100644 index 0000000..83fc0a5 --- /dev/null +++ b/config/app.properties @@ -0,0 +1,123 @@ +#extend config +spring.application.name=apisvr +server.port=11090 + + + +#instance.ip=127.0.0.1 +# 配置中心url +server.servlet.context-path=/api/apisvr +#server.servlet.context-path=/ +server.tomcat.uri-encoding=UTF-8 +server.tomcat.accept-count=1000 +server.tomcat.threads.max=800 +server.tomcat.threads.min-spare=100 + +#undertow +server.undertow.direct-buffers=true +server.undertow.threads.io=8 +server.undertow.threads.worker=258 + +#DataSource +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.url=jdbc:mysql://192.168.88.23:31306/tnuat?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +spring.datasource.username=tnuat +spring.datasource.password=Tnuat123#@! + + +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=10 +spring.datasource.druid.maxActive=20 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.maxEvictableIdleTimeMillis=900000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.webStatFilter.enabled=true +spring.datasource.druid.statViewServlet.enabled=true +spring.datasource.druid.statViewServlet.allow.url-pattern=/druid/* +spring.datasource.druid.statViewServlet.allow.login-username=xdadan +spring.datasource.druid.statViewServlet.allow.login-password=123456 +spring.datasource.druid.filter.stat.enabled=true +spring.datasource.druid.filter.stat.log-slow-sql=true +spring.datasource.druid.filter.stat.slow-sql-millis=1000 +spring.datasource.druid.filter.stat.merge-sql=true +spring.datasource.druid.filter.wall.config.multi-statement-allow=true + + +spring.datasource.max-wait=30000 +spring.datasource.max-active=200 +spring.datasource.initial-size=20 +spring.datasource.max-idle=20 +spring.datasource.min-idle=10 +spring.datasource.test-on-borrow=true +spring.datasource.test-while-idle=true +spring.datasource.validationQuery=select 1 from dual +spring.datasource.connection-test-query=select 1 from dual + + +#redis +spring.redis.database=0 +spring.redis.host=192.168.88.58 +#spring.redis.cluster.nodes=192.168.88.58 +spring.redis.port=6379 +spring.redis.password=TNL9910Aksd&5$(((*sd88sdsds99asdsa8 +spring.redis.pool.max-active=8 +spring.redis.pool.max-wait=-1 +spring.redis.pool.max-idle=8 +spring.redis.pool.min-idle=0 +spring.redis.timeout=10s +spring.redis.lettuce.pool.min-idle=0 +spring.redis.lettuce.pool.max-idle=8 +spring.redis.lettuce.pool.max-active=8 +spring.redis.lettuce.pool.max-wait=-1ms + +redisson.address=redis://192.168.88.58:6379 +redisson.password=TNL9910Aksd&5$(((*sd88sdsds99asdsa8 +redisson.timeout=3000 +redisson.database=0 +redisson.connectionPoolSize=10 +redisson.connectionMinimumIdleSize=10 + +#rabbitmq +spring.rabbitmq.host=192.168.88.57 +spring.rabbitmq.port=5672 +spring.rabbitmq.username=ccloud +spring.rabbitmq.password=123#@! +spring.rabbitmq.virtual-host=/pushcus +mq.isStartListener=false + + +#DXP001_SEND + +#MVC +spring.mvc.static-path-pattern=/** +#spring.resources.static-locations = classpath:/templates/,classpath:/resources/,classpath:/static/,classpath:/html/ +spring.resources.static-locations=classpath:/static/,classpath:/html/ +spring.mvc.view.prefix=/WEB-INF/views/ +spring.mvc.view.suffix=.jsp + +spring.http.multipart.maxFileSize=10000Mb +spring.http.multipart.maxRequestSize=10000Mb + +pay.temp.dir=tmp +pay.profile=. + +xdd.enc.key= +#X20230103080 + +pay.api-online-url=http://api.pay.xdadan.com/api/gateway/router/online +pay.app-id=26150000179 +pay.app-secret=91be0b54ba41f71f8e0506a7da95a8ff + +erp.api.base-url==http://api.erp2.xdadan.com/api/microsvr +erp.api.pay.notify-url=http://api.erp2.xdadan.com/api/microsvr/common/payNotifyCallback + + +system.fontPath=/usr/share/fonts + +logging.config=logback-spring.xml diff --git a/docker_build.sh b/docker_build.sh new file mode 100644 index 0000000..e8908d7 --- /dev/null +++ b/docker_build.sh @@ -0,0 +1,15 @@ +PUB_VERSION=3.0.0 + +docker build -t emis/emis-api-server:$PUB_VERSION . + +#docker run -it -d --name emis-api-server -p 19088:9088 emis/emis-api-server:latest + +# -- docker push to hub.k8s.loc -- +docker tag emis/emis-api-server:$PUB_VERSION hub.k8s.loc/emis/emis-api-server:latest +#docker login hub.k8s.loc +# admin 123456 +docker push hub.k8s.loc/emis/emis-api-server:latest + +# -- k8s -- +# kubectl apply -f k8s.yml + diff --git a/emis-api-server/emis-api-server.iml b/emis-api-server/emis-api-server.iml new file mode 100644 index 0000000..703cb33 --- /dev/null +++ b/emis-api-server/emis-api-server.iml @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/emis-api-server/pom.xml b/emis-api-server/pom.xml new file mode 100644 index 0000000..e466a57 --- /dev/null +++ b/emis-api-server/pom.xml @@ -0,0 +1,200 @@ + + + 4.0.0 + + com.xdadan + emis + 1.0.0 + ../pom.xml + + jar + emis-api-server + 1.0.0 + + emis api web 服务入口 + + + 8 + pub + + + + + + + com.xdadan + emis-framework + 1.0.4 + + + + + com.xdadan + emis-api-web + 1.0.0 + + + + + mysql + mysql-connector-java + 8.0.16 + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + com.guardsquare + proguard-base + 7.1.0 + runtime + + + com.guardsquare + proguard-core + 7.1.0 + runtime + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.1.1.RELEASE + + true + + + + + repackage + + + true + true + com.xdadan.erp.LaunchApplication + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.0.0-M1 + + + true + + + + + maven-antrun-plugin + + + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + false + ${project.artifactId} + + + + + + ${project.artifactId} + + + \ No newline at end of file diff --git a/emis-api-server/pom_proguard.xml b/emis-api-server/pom_proguard.xml new file mode 100644 index 0000000..50d90a0 --- /dev/null +++ b/emis-api-server/pom_proguard.xml @@ -0,0 +1,253 @@ + + + 4.0.0 + + emis + com.xdadan + 1.0.0 + ../pom.xml + + jar + emis-launcher + 1.0.0 + + web服务入口 + + + 8 + pub + + + + + + + com.xdadan + emis-framework + 1.0.0 + + + + com.xdadan + emis-system-web + 1.0.0 + + + + + com.xdadan + emis-biz-web + 1.0.0 + + + + com.alibaba.boot + nacos-config-spring-boot-starter + 0.2.12 + + + + com.alibaba.boot + nacos-discovery-spring-boot-starter + 0.2.12 + + + + com.alibaba.boot + nacos-config-spring-boot-actuator + 0.2.12 + + + + com.alibaba.boot + nacos-discovery-spring-boot-actuator + 0.2.12 + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + + + + + + + + + + + + + + mysql + mysql-connector-java + + + + com.guardsquare + proguard-base + 7.1.0 + runtime + + + com.guardsquare + proguard-core + 7.1.0 + runtime + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + + + com.github.wvengen + proguard-maven-plugin + 2.2.0 + + + + package + + proguard + + + + + ${project.build.finalName}.jar + + ${project.build.finalName}.jar + + true + ${project.basedir}/proguard.cfg + + + ${java.home}/lib/rt.jar + ${java.home}/lib/jce.jar + + + + + + net.sf.proguard + proguard-base + 6.2.2 + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.1.1.RELEASE + + true + + + + + repackage + + + true + true + com.xdadan.erp.LaunchApplication + + + + + + + maven-antrun-plugin + + + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2.1 + + ${project.build.finalName} + false + + src/main/assembly/assembly.xml + + + + + + make-assembly + package + + single + + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + false + ${project.artifactId} + + + + + + ${project.artifactId} + + + \ No newline at end of file diff --git a/emis-api-server/proguard.cfg b/emis-api-server/proguard.cfg new file mode 100644 index 0000000..265e56b --- /dev/null +++ b/emis-api-server/proguard.cfg @@ -0,0 +1,52 @@ +#指定Java的版本 +-target 1.8 +#proguard会对代码进行优化压缩,他会删除从未使用的类或者类成员变量等 +-dontshrink +#是否关闭字节码级别的优化,如果不开启则设置如下配置 +-dontoptimize +#混淆时不生成大小写混合的类名,默认是可以大小写混合 +-dontusemixedcaseclassnames +# 对于类成员的命名的混淆采取唯一策略 +-useuniqueclassmembernames +#混淆时不生成大小写混合的类名,默认是可以大小写混合 +-dontusemixedcaseclassnames +#混淆类名之后,对使用Class.forName('className')之类的地方进行相应替代 +-adaptclassstrings + +#对异常、注解信息予以保留 +-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod +# 此选项将保存接口中的所有原始名称(不混淆)--> +-keepnames interface ** { *; } +# 此选项将保存所有软件包中的所有原始接口文件(不进行混淆) +#-keep interface * extends * { *; } +#保留参数名,因为控制器,或者Mybatis等接口的参数如果混淆会导致无法接受参数,xml文件找不到参数 +-keepparameternames +# 保留枚举成员及方法 +-keepclassmembers enum * { *; } + +# 不混淆所有的set/get方法 +-keepclassmembers public class * {void set*(***);*** get*();} + +# 指定要保留在输出文件内的目录(解决 spring autowire 装配失败的问题) +-keepdirectories +#-keepdirectories target\classes\cn\XXX\busi\online\cgform\business\RestBusiness.class +#-keepdirectories cn.XXX.busi.online.cgform.business.* + +# 不混淆所有类,保存原始定义的注释- +-keepclassmembers class * { + @org.springframework.context.annotation.Bean *; + @org.springframework.beans.factory.annotation.Autowired *; + @org.springframework.beans.factory.annotation.Value *; + @org.springframework.stereotype.Service *; + @org.springframework.stereotype.Component *; + } + +#忽略warn消息 +-ignorewarnings +#忽略note消息 +-dontnote +#打印配置信息 +-printconfiguration +-keep public class com.xdadan.erp.LaunchApplication { + public static void main(java.lang.String[]); + } \ No newline at end of file diff --git a/emis-api-server/src/main/java/com/xdadan/erp/LaunchApplication.java b/emis-api-server/src/main/java/com/xdadan/erp/LaunchApplication.java new file mode 100644 index 0000000..241b81c --- /dev/null +++ b/emis-api-server/src/main/java/com/xdadan/erp/LaunchApplication.java @@ -0,0 +1,78 @@ +package com.xdadan.erp; + +import com.xdadan.erp.common.utils.PropertyUtil; +import org.springframework.boot.WebApplicationType; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.annotation.EnableScheduling; + +import java.io.File; + +/** + * 启动程序 + * + * @author xdadan + */ +@EnableScheduling +// 开启缓存 +@EnableCaching +@EnableAsync +@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) +public class LaunchApplication extends SpringBootServletInitializer { + + public static void main(String[] args) throws Exception { + initByLocal(args); + } + + /** + * 通过本地配置文件运行 + * @param args + */ + private static void initByLocal(String[] args){ + String configFile = ""; + try { + File directory = new File("."); + System.out.println(directory.getCanonicalPath()); + System.out.println(directory.getAbsolutePath()); + + configFile = PropertyUtil.getPropertyValue("config.properties", "config.file"); + System.out.println("use config file:" + configFile); + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + new SpringApplicationBuilder( + LaunchApplication.class) + .properties("spring.config.location=" + configFile) + .web(WebApplicationType.SERVLET).run(args); + } + + + +// @Override +// public void onStartup(ServletContext servletContext) throws ServletException { +// super.onStartup(servletContext); +// servletContext.setSessionTrackingModes(Collections.singleton(SessionTrackingMode.COOKIE)); +// SessionCookieConfig sessionCookieConfig = servletContext.getSessionCookieConfig(); +// sessionCookieConfig.setHttpOnly(true); +// } + + +// @Bean +// public DefaultWebSessionManager sessionManager() { +// DefaultWebSessionManager defaultWebSessionManager = new DefaultWebSessionManager(); +// defaultWebSessionManager.setGlobalSessionTimeout(60 * 30 * 1000); +// defaultWebSessionManager.setDeleteInvalidSessions(true); +// defaultWebSessionManager.setSessionValidationSchedulerEnabled(true); +// defaultWebSessionManager.setSessionIdCookieEnabled(true); +// // tomcat的JESSIONID自动生成模块 +// defaultWebSessionManager.setSessionIdUrlRewritingEnabled(false); +// return defaultWebSessionManager; +// } +} diff --git a/emis-api-server/src/main/java/com/xdadan/erp/LaunchServletInitializer.java b/emis-api-server/src/main/java/com/xdadan/erp/LaunchServletInitializer.java new file mode 100644 index 0000000..226ed37 --- /dev/null +++ b/emis-api-server/src/main/java/com/xdadan/erp/LaunchServletInitializer.java @@ -0,0 +1,18 @@ +package com.xdadan.erp; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * web容器中进行部署 + * + * @author xdadan + */ +public class LaunchServletInitializer extends SpringBootServletInitializer +{ + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) + { + return application.sources(LaunchApplication.class); + } +} diff --git a/emis-api-server/src/main/resources/META-INF/spring-devtools.properties b/emis-api-server/src/main/resources/META-INF/spring-devtools.properties new file mode 100644 index 0000000..2b23f85 --- /dev/null +++ b/emis-api-server/src/main/resources/META-INF/spring-devtools.properties @@ -0,0 +1 @@ +restart.include.json=/com.alibaba.fastjson.*.jar \ No newline at end of file diff --git a/emis-api-server/src/main/resources/application_local.yml b/emis-api-server/src/main/resources/application_local.yml new file mode 100644 index 0000000..9feee17 --- /dev/null +++ b/emis-api-server/src/main/resources/application_local.yml @@ -0,0 +1,194 @@ +# 项目相关配置 +pay: + # 名称 + name: apisvr + # 版本 + version: 1.0.0 + # 版权年份 + copyrightYear: 2022 + # 实例演示开关 + demoEnabled: false +# profile: xdadan/uploadPath + # 获取ip地址开关 + addressEnabled: false + # 验证码类型 math 数组计算 char 字符验证 + captchaType: char + +# 开发环境配置 +#server: +# # 服务器的HTTP端口,默认为8080 +# port: 8080 +# servlet: +# # 应用的访问路径 +# context-path: / +# tomcat: +# # tomcat的URI编码 +# uri-encoding: UTF-8 +# # 连接数满后的排队数,默认为100 +# accept-count: 1000 +# threads: +# # tomcat最大线程数,默认为200 +# max: 800 +# # Tomcat启动初始化的线程数,默认值10 +# min-spare: 100 + +# 日志配置 +logging: + level: + com.xdadan: debug + org.springframework: warn + +# Spring配置 +spring: + # 资源信息 + messages: + # 国际化资源文件路径 + basename: i18n/messages +# profiles: +# active: druid + # 文件上传 + servlet: + multipart: + # 单个文件大小 + max-file-size: 1000MB + # 设置总上传的文件大小 + max-request-size: 20000MB + cache: +# 指定所使用的缓存管理器 + type: REDIS + cache-names: redisCache + redis: + cache-null-values: true + use-key-prefix: true + time-to-live: 0 + jackson: + serialization: + FAIL_ON_EMPTY_BEANS: false + default-property-inclusion: ALWAYS + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + + # 服务模块 + devtools: + restart: + # 热部署开关 + enabled: true + +token: + # 令牌自定义标识 + header: X-Token + # 令牌密钥 + secret: 10942fd6f30d45a567e7ec84b18f9ca7c1 + # 令牌有效期(默认30分钟) + expireTime: 1080 + +# MyBatis配置 +#mybatis: +# # 搜索指定包别名 +# typeAliasesPackage: com.xdadan.**.domain +# # 配置mapper的扫描,找到所有的mapper.xml映射文件 +# mapperLocations: classpath*:mapper/**/*Mapper.xml +# # 加载全局的配置文件 +# configLocation: classpath:mybatis/mybatis-config.xml + +mybatis-plus: + type-aliases-package: com.xdadan.**.domain + mapper-locations: classpath*:mapper/**/*Mapper.xml +# config-location: classpath:mybatis/mybatis-config.xml + configuration: + cache-enabled: true + map-underscore-to-camel-case: true + lazy-loading-enabled: true + aggressive-lazy-loading: false + global-config: + #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID"; + id-type: 1 + #驼峰下划线转换 + db-column-underline: true + configuration: + #配置打印sql + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +saas: + tenant: + enable: true + column: tenant_id + filterTables: + ignoreTables: + - sys_account + - sys_account_log + - sys_api_log + - sys_appinfo + - sys_config + - sys_cost_time + - sys_dept + - sys_dict_data + - sys_dict_type + - sys_domain + - sys_dynamic_ds + - sys_dynamic_sql + - sys_file_info + - sys_i18n + - sys_im_friend + - sys_im_group + - sys_im_group_user + - sys_im_message + - sys_job + - sys_job_log + - sys_logininfor + - sys_mail_queue + - sys_menu + - sys_merchant + - sys_merchant_service + - sys_merchant_user_rel + - sys_mq_queues + - sys_notice + - sys_oper_log + - sys_post + - sys_role + - sys_role_dept + - sys_role_menu + - sys_role_merchant + - sys_role_tenant + - sys_sequence + - sys_service + - sys_storage + - sys_tenant + - sys_tenant_domain_apply + - sys_upapi_log + - sys_user + - sys_user_copy1 + - sys_user_post + - sys_user_role + - sys_validate_record + - sys_zone_banner + - sys_zone_config + - sys_zone_nav + ignoreLoginNames: + - padmin + +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + supportMethodsArguments: true + params: count=countSql + +# Knife4j配置 +knife4j: + # 是否开启增强模式 + enable: true + basic: + enable: true + username: admin + password: 654321 + setting: + language: zh-CN + +# 防止XSS攻击 +xss: + # 过滤开关 + enabled: true + # 排除链接(多个用逗号分隔) + excludes: /system/notice + # 匹配链接 + urlPatterns: /system/*,/monitor/*,/tool/* diff --git a/emis-api-server/src/main/resources/banner.txt b/emis-api-server/src/main/resources/banner.txt new file mode 100644 index 0000000..3433519 --- /dev/null +++ b/emis-api-server/src/main/resources/banner.txt @@ -0,0 +1,2 @@ +Application Version: ${pay.version} +Spring Boot Version: ${spring-boot.version} \ No newline at end of file diff --git a/emis-api-server/src/main/resources/i18n/messages.properties b/emis-api-server/src/main/resources/i18n/messages.properties new file mode 100644 index 0000000..759cfe8 --- /dev/null +++ b/emis-api-server/src/main/resources/i18n/messages.properties @@ -0,0 +1,38 @@ +#错误消息 +not.null=* 必须填写 +user.jcaptcha.error=验证码错误 +user.jcaptcha.expire=验证码已失效 +user.smscode.expire=验证码已失效 +user.not.exists=用户不存在/密码错误 +user.password.not.match=用户不存在/密码错误 +user.password.retry.limit.count=密码输入错误{0}次 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟 +user.password.delete=对不起,您的账号已被删除 +user.blocked=用户已封禁,请联系管理员 +role.blocked=角色已封禁,请联系管理员 +user.logout.success=退出成功 + +length.not.valid=长度必须在{min}到{max}个字符之间 + +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 +user.password.not.valid=* 5-50个字符 + +user.email.not.valid=邮箱格式错误 +user.mobile.phone.number.not.valid=手机号格式错误 +user.login.success=登录成功 +user.register.success=注册成功 +user.notfound=请重新登录 +user.forcelogout=管理员强制退出,请重新登录 +user.unknown.error=未知错误,请重新登录 + +##文件上传消息 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! +upload.filename.exceed.length=上传的文件名最长{0}个字符 + +##权限 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] diff --git a/emis-api-server/src/main/resources/logback.xml b/emis-api-server/src/main/resources/logback.xml new file mode 100644 index 0000000..f30238e --- /dev/null +++ b/emis-api-server/src/main/resources/logback.xml @@ -0,0 +1,52 @@ + + + apisvr + + + + UTF-8 + [%contextName][%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%C{3}.%M\(line:%L\)]:> %m%n + + + + + ERROR + ACCEPT + DENY + + ./logs/app_all_error.log + + ./logs/app_all_error.%i.log + 1 + 10 + + + 10MB + + + [%contextName][%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%C{3}.%M\(line:%L\)]:> %m%n + + + + + INFO + + ./logs/app_all_info.log + + ./logs/app_all_info.%i.log + 1 + 10 + + + 10MB + + + [%contextName][%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%C{3}.%M\(line:%L\)]:> %m%n + + + + + + + + \ No newline at end of file diff --git a/emis-api-server/src/main/resources/mybatis/mybatis-config.xml b/emis-api-server/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 0000000..0c39f8e --- /dev/null +++ b/emis-api-server/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/emis-api-server/src/main/resources/static/images/slidepic_1.jpg b/emis-api-server/src/main/resources/static/images/slidepic_1.jpg new file mode 100644 index 0000000..f115d5a Binary files /dev/null and b/emis-api-server/src/main/resources/static/images/slidepic_1.jpg differ diff --git a/emis-api-server/src/main/resources/static/images/slidepic_2.jpg b/emis-api-server/src/main/resources/static/images/slidepic_2.jpg new file mode 100644 index 0000000..2604468 Binary files /dev/null and b/emis-api-server/src/main/resources/static/images/slidepic_2.jpg differ diff --git a/emis-api-server/src/main/resources/static/images/slidepic_3.jpg b/emis-api-server/src/main/resources/static/images/slidepic_3.jpg new file mode 100644 index 0000000..4dd0c28 Binary files /dev/null and b/emis-api-server/src/main/resources/static/images/slidepic_3.jpg differ diff --git a/emis-api-server/src/main/resources/static/images/slidepic_4.jpg b/emis-api-server/src/main/resources/static/images/slidepic_4.jpg new file mode 100644 index 0000000..bfa16cd Binary files /dev/null and b/emis-api-server/src/main/resources/static/images/slidepic_4.jpg differ diff --git a/emis-api-server/src/main/resources/static/images/slidepic_5.jpg b/emis-api-server/src/main/resources/static/images/slidepic_5.jpg new file mode 100644 index 0000000..6bdd2ef Binary files /dev/null and b/emis-api-server/src/main/resources/static/images/slidepic_5.jpg differ diff --git a/emis-api-server/src/main/resources/static/images/slidepic_6.jpg b/emis-api-server/src/main/resources/static/images/slidepic_6.jpg new file mode 100644 index 0000000..69a92cf Binary files /dev/null and b/emis-api-server/src/main/resources/static/images/slidepic_6.jpg differ diff --git a/emis-api-server/src/main/resources/static/images/slidepic_7.jpg b/emis-api-server/src/main/resources/static/images/slidepic_7.jpg new file mode 100644 index 0000000..492bf52 Binary files /dev/null and b/emis-api-server/src/main/resources/static/images/slidepic_7.jpg differ diff --git a/logback-spring.xml b/logback-spring.xml new file mode 100644 index 0000000..f6a187d --- /dev/null +++ b/logback-spring.xml @@ -0,0 +1,52 @@ + + + apisvr + + + + UTF-8 + [%contextName][%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%C{3}.%M\(line:%L\)]:> %m%n + + + + + ERROR + ACCEPT + DENY + + ./logs/app_all_error.log + + ./logs/app_all_error.%i.log + 1 + 10 + + + 10MB + + + [%contextName][%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%C{3}.%M\(line:%L\)]:> %m%n + + + + + INFO + + ./logs/app_all_info.log + + ./logs/app_all_info.%i.log + 1 + 10 + + + 10MB + + + [%contextName][%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%C{3}.%M\(line:%L\)]:> %m%n + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..90353c7 --- /dev/null +++ b/pom.xml @@ -0,0 +1,257 @@ + + + 4.0.0 + + com.xdadan + emis + 1.0.0 + + emis-api-server + http://www.tanex56.com + emis-api-server + + + 1.0.0 + UTF-8 + UTF-8 + 1.8 + 3.1.1 + 1.2.8 + 1.21 + 1.8.0 + 3.0.0 + 2.3.2 + 2.2.2 + 1.4.1 + 1.2.79 + 6.1.2 + 5.10.0 + 2.11.0 + 1.4 + 3.2.2 + 4.1.2 + 2.3 + 0.9.1 + + + + emis-api-server + + + pom + + + + + + + + org.springframework.boot + spring-boot-dependencies + 2.5.10 + pom + import + + + + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + + + org.apache.shiro + shiro-core + ${shiro.version} + + + + + org.apache.shiro + shiro-spring + ${shiro.version} + + + + + org.apache.shiro + shiro-ehcache + ${shiro.version} + + + + + eu.bitwalker + UserAgentUtils + ${bitwalker.version} + + + + + + + + + + + com.baomidou + mybatis-plus-extension + 3.5.0 + compile + + + + com.baomidou + mybatis-plus-boot-starter + 3.5.0 + + + + + com.github.pagehelper + pagehelper-spring-boot-starter + ${pagehelper.boot.version} + + + + + com.github.oshi + oshi-core + ${oshi.version} + + + + net.java.dev.jna + jna + ${jna.version} + + + + net.java.dev.jna + jna-platform + ${jna.version} + + + + + + + + + + + + + + + + + + commons-io + commons-io + ${commons.io.version} + + + + + commons-fileupload + commons-fileupload + ${commons.fileupload.version} + + + + + org.apache.poi + poi-ooxml + ${poi.version} + + + + + org.apache.velocity + velocity-engine-core + ${velocity.version} + + + + + commons-collections + commons-collections + ${commons.collections.version} + + + + + com.alibaba + fastjson + ${fastjson.version} + + + + + io.jsonwebtoken + jjwt + ${jwt.version} + + + + + com.github.penggle + kaptcha + ${kaptcha.version} + + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + ${java.version} + ${java.version} + ${project.build.sourceEncoding} + + + + + + + + public + aliyun nexus + https://maven.aliyun.com/repository/public + + true + + + + + + + public + aliyun nexus + https://maven.aliyun.com/repository/public + + true + + + false + + + + + \ No newline at end of file diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..2eae4ee --- /dev/null +++ b/startup.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +mkdir logs + +ps -ef | grep emis-api-server.jar | grep -v color | awk '{print $2}' | xargs kill -9 + +#JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m +#--server.port=9080 + +nohup java -jar -Dspring.application.name='apisvr' emis-api-server.jar >> ./logs/output.log 2>&1 & + +# jprofiler monitor +# --------------------------- +# nohup java -jar emis-server.jar -agentlib:jprofilerti=port=8849 -Xbootclasspath/a:/app/jprofiler/jprofiler11/bin/agent.jar -agentpath:/app/jprofiler/jprofiler11/bin/linux-x64/libjprofilerti.so=port=8849,nowait & +# jpenable + + +# jconsole or jvisualvm +# --------------------------- +#java -jar -Djava.rmi.server.hostname=192.168.88.57 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=21099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false emis-server.jar & + +