提交 eaf14c6a 编写于 作者: A ascrutae

修复页面描述不符的问题 修复授权文件下载

上级 d3e9b3cc
......@@ -50,7 +50,7 @@ public class AuthFileController extends BaseController {
return;
}
LoginUserInfo loginUserInfo = fetchLoginUserInfoFromSession(request);
String filepath = loginUserInfo.getUserName() + "-" + applicationCode + ".jar";
String filepath = "sky-walking.auth";
response.reset();
response.setContentType("application/octet-stream");
String fileName = URLDecoder.decode(filepath, "utf-8");
......@@ -79,10 +79,7 @@ public class AuthFileController extends BaseController {
File file = new File(request.getServletContext().getRealPath("/") + File.separator + "download" + File.separator + fileName);
file.delete();
// 生成JarFile
JarOutputStream stream = new JarOutputStream(new FileOutputStream(file));
JarEntry entry = new JarEntry("sky-walking.auth");
stream.putNextEntry(entry);
FileOutputStream stream = new FileOutputStream(file);
properties.store(stream, "");
stream.flush();
stream.close();
......
......@@ -6,22 +6,20 @@ import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import javax.annotation.PostConstruct;
import java.sql.Connection;
import java.sql.SQLException;
@Repository
public class DBConnectUtil {
private static Logger logger = LogManager.getLogger(DBConnectUtil.class);
@Autowired
private static HikariDataSource hikariDataSource;
private HikariDataSource dataSource;
public Connection getConnection() {
try {
return hikariDataSource.getConnection();
return dataSource.getConnection();
} catch (SQLException e) {
logger.error("Failed to get connection", e);
throw new RuntimeException("Cannot get connection.");
......
......@@ -214,14 +214,14 @@
<label for="inputPassword3" class="col-sm-3 control-label">收件人地址:</label>
<div class="col-sm-9">
<input type="text-are" class="form-control" id="mailTo" name="mailTo"
placeholder="Application Description">
placeholder="test@test.com,test@test.com">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">抄送人地址:</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="mailCc" name="mailCc"
placeholder="Application Description">
placeholder="test@test.com,test@test.com">
</div>
</div>
</div>
......@@ -349,4 +349,4 @@
</div>
</div>
</script>
</#macro>
\ No newline at end of file
</#macro>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册