mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-06-09 10:23:53 +08:00
Merge branch 'dev'
This commit is contained in:
@@ -52,7 +52,7 @@ magic-api 是一个基于Java的接口快速开发框架,编写接口将通过
|
||||
<dependency>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-spring-boot-starter</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.4.2</version>
|
||||
</dependency>
|
||||
```
|
||||
## 修改application.properties
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-parent</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.4.2</version>
|
||||
</parent>
|
||||
<artifactId>magic-api-spring-boot-starter</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@@ -28,9 +28,11 @@ import java.util.Objects;
|
||||
public class ApplicationUriPrinter implements CommandLineRunner {
|
||||
@Resource
|
||||
private ConfigurableEnvironment springEnv;
|
||||
|
||||
@Autowired
|
||||
private MagicAPIProperties properties;
|
||||
@Autowired
|
||||
|
||||
@Autowired(required = false)
|
||||
private WebServerApplicationContext serverApplicationContext;
|
||||
|
||||
@Override
|
||||
@@ -42,20 +44,20 @@ public class ApplicationUriPrinter implements CommandLineRunner {
|
||||
} catch (UnknownHostException e) {
|
||||
System.out.println("当前服务地址获取失败");
|
||||
}
|
||||
int port = serverApplicationContext.getWebServer().getPort();
|
||||
int port = serverApplicationContext != null ? serverApplicationContext.getWebServer().getPort() : Integer.parseInt(springEnv.getProperty("server.port", "9999"));
|
||||
String path = springEnv.getProperty("server.servlet.context-path", "");
|
||||
String magicWebPath = properties.getWeb();
|
||||
String schema = "http://";
|
||||
String localUrl = schema + PathUtils.replaceSlash(String.format("localhost:%s/%s/%s/",port,path, Objects.toString(properties.getPrefix(),"")));
|
||||
String externUrl = schema + PathUtils.replaceSlash(String.format("%s:%s/%s/%s/",ip,port,path, Objects.toString(properties.getPrefix(),"")));
|
||||
String localUrl = schema + PathUtils.replaceSlash(String.format("localhost:%s/%s/%s/", port, path, Objects.toString(properties.getPrefix(), "")));
|
||||
String externUrl = schema + PathUtils.replaceSlash(String.format("%s:%s/%s/%s/", ip, port, path, Objects.toString(properties.getPrefix(), "")));
|
||||
System.out.println(
|
||||
"服务启动成功,magic-api已内置启动! Access URLs:\n\t" +
|
||||
"接口本地地址: \t\t"+localUrl+"\n\t" +
|
||||
"接口本地地址: \t\t" + localUrl + "\n\t" +
|
||||
"接口外部访问地址: \t" + externUrl
|
||||
);
|
||||
if (!StringUtils.isEmpty(magicWebPath)) {
|
||||
String webPath = schema + PathUtils.replaceSlash(String.format("%s:%s/%s/%s/index.html", ip, port, path, magicWebPath));
|
||||
System.out.println("\t接口配置平台: \t\t" + webPath);
|
||||
String webPath = schema + PathUtils.replaceSlash(String.format("%s:%s/%s/%s/index.html", ip, port, path, magicWebPath));
|
||||
System.out.println("\t接口配置平台: \t\t" + webPath);
|
||||
}
|
||||
System.out.println("\t可通过配置关闭输出: \tmagic-api.show-url=false");
|
||||
System.out.println("********************************************当前服务相关地址********************************************");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-parent</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.4.2</version>
|
||||
</parent>
|
||||
<artifactId>magic-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@@ -19,8 +19,6 @@ public interface MagicLoggerContext {
|
||||
String sessionId = SESSION.get();
|
||||
if (sessionId != null) {
|
||||
WebSocketSessionManager.sendBySessionId(sessionId, MessageType.LOG, logInfo);
|
||||
}else{
|
||||
WebSocketSessionManager.sendToAll(MessageType.LOG, logInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ public class NamedTable {
|
||||
|
||||
@Comment("执行update语句")
|
||||
public int update(@Comment("各项列和值") Map<String, Object> data) {
|
||||
return update(data, false);
|
||||
return update(data, this.withBlank);
|
||||
}
|
||||
|
||||
@Comment("查询条数")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-parent</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.4.2</version>
|
||||
</parent>
|
||||
<artifactId>magic-editor</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "magic-editor",
|
||||
"version": "1.4.1",
|
||||
"version": "1.4.2",
|
||||
"private": false,
|
||||
"description": "magic-editor for magic-api",
|
||||
"main": "dist/magic-editor.umd.min.js",
|
||||
|
||||
@@ -326,7 +326,7 @@ Tokenizer.prototype._read_comment = function(c) {
|
||||
return token;
|
||||
};
|
||||
Tokenizer.prototype._read_multi_string = function() {
|
||||
if(this._input.match(/"""/)){
|
||||
if(this._input.match(/"""/g)){
|
||||
let result = this._input.readUntilAfter(/"""/g)
|
||||
return this._create_token(TOKEN.STRING, '"""' + result);
|
||||
}
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-parent</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.4.2</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>magic-api-parent</name>
|
||||
<description>auto generate http api</description>
|
||||
@@ -30,7 +30,7 @@
|
||||
</scm>
|
||||
<properties>
|
||||
<spring-boot.version>2.4.5</spring-boot.version>
|
||||
<magic-script.version>1.5.1</magic-script.version>
|
||||
<magic-script.version>1.5.2</magic-script.version>
|
||||
<commons-compress.version>1.21</commons-compress.version>
|
||||
<commons-io.version>2.7</commons-io.version>
|
||||
<commons-text.version>1.6</commons-text.version>
|
||||
|
||||
Reference in New Issue
Block a user