Browse Source

app-conf.js配置文件迁移至应用工程中

huangbo 4 years ago
parent
commit
3fb5293f81

+ 1 - 1
ipu-rest-scaffold/pom.xml

@ -58,7 +58,7 @@
58 58
			<scope>provided</scope>
59 59
		</dependency>
60 60
		<dependency>
61
			<groupId>com.ai.ipu</groupId>
61
			<groupId>com.ai.ipu.server</groupId>
62 62
			<artifactId>ipu-portal</artifactId>
63 63
			<version>${ipu-rest}</version>
64 64
		</dependency>

+ 48 - 0
ipu-rest-scaffold/src/main/resources/webapp/portal/static/conf/app-conf.js

@ -0,0 +1,48 @@
1
/**
2
 * @file 本文件是应用静态配置文件
3
 * @author PRD MGPD IPU-IOT Dept.
4
 * @description 配置参数说明:
5
 * window.APP_CONF -- 本参数为项目服务调用的本地静态配置,用来服务于修改项目服务请求baseurl
6
 * window.APP_TITLE -- 本参数为项目名称的本地静态配置
7
 * ......more
8
 */
9
10
/**
11
 * @key 本参数字段是应用服务静态配置文件
12
 * @description 配置参数说明:
13
 * baseURL -- 主要服务的基础URL,同axios配置中的baseURL。如果配置
14
 *            了它,那么本配置将覆盖axios.config.js中
15
 *            的baseURL配置;如果配置了空字符串或null,
16
 *            那么这里的配置将被忽略
17
 * app_urls -- 其他嵌入应用服务的基础URL,同axios配置中的baseURL。如果配置
18
 *            了它,那么本配置将覆盖axios.config.js中
19
 *            的baseURL配置;如果配置了空字符串或null,
20
 *            那么这里的配置将被忽略
21
 * @example <caption>本项目中定义了两种请求类型</caption>
22
 * mainServer -- 项目主要业务服务,content-type为application/x-www-form-urlencoded的post请求类型
23
 * jsonServer -- 其他服务,content-type为application/json的post请求类型
24
 * ......更多后续在项目中定义的服务请求会在此处更新,方便做静态配置
25
 * 配置示例:
26
 * window.APP_CONF = {
27
 *   baseURL: {
28
 *     mainServer: 'http://10.192.168.1/bar'
29
 *   },
30
 *   app_urls: {
31
 *     jsonServer: 'http://108.190.16.1/foo'
32
 *   }
33
 * }
34
 */
35
36
window.APP_CONF = {
37
  baseURL: {
38
    mainServer: 'http://localhost:8080/ipu'
39
  }
40
}
41
42
/**
43
 * @key 本参数字段是项目各类名字、名称的静态配置文件
44
 * @description 配置参数说明:
45
 * ......项目开发中,后续静态配置在此处更新
46
 */
47
48
window.APP_TITLE = {}