parent
997069ffac
commit
f6c4b651ce
@ -0,0 +1,5 @@
|
|||||||
|
# 日志配置
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.jiuyv.sptccc.agile: debug
|
||||||
|
org.springframework: warn
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.jiuyv.sptcc.agile.batch;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
|
||||||
|
@EnableDiscoveryClient
|
||||||
|
@SpringBootApplication
|
||||||
|
public class BatchDwsApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
SpringApplication.run(BatchDwsApplication.class, args);
|
||||||
|
|
||||||
|
// HiveServer2的JDBC连接URL
|
||||||
|
String hiveServerURL = "jdbc:hive2://172.16.12.101:10000/hive;socketTimeout=12000;";
|
||||||
|
String hiveUser = "flink";
|
||||||
|
String hivePassword = "flink";
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 加载Hive JDBC驱动程序
|
||||||
|
Class.forName("org.apache.hive.jdbc.HiveDriver");
|
||||||
|
|
||||||
|
// 连接到HiveServer2
|
||||||
|
Connection connection = DriverManager.getConnection(hiveServerURL, hiveUser, hivePassword);
|
||||||
|
|
||||||
|
// 执行Hive查询
|
||||||
|
String sql = "select * from student2";
|
||||||
|
PreparedStatement statement = connection.prepareStatement(sql);
|
||||||
|
ResultSet resultSet = statement.executeQuery();
|
||||||
|
|
||||||
|
// 处理查询结果
|
||||||
|
while (resultSet.next()) {
|
||||||
|
System.out.println(resultSet.getInt("id"));
|
||||||
|
System.out.println(resultSet.getString("name"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭资源
|
||||||
|
resultSet.close();
|
||||||
|
statement.close();
|
||||||
|
connection.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration debug="false">
|
||||||
|
<!-- LOG目录 -->
|
||||||
|
<property name="LOG_HOME" value="logs"/>
|
||||||
|
|
||||||
|
<!-- JSON_LOG目录 -->
|
||||||
|
<property name="JSON_LOG_HOME" value="logs/jsonlog"/>
|
||||||
|
|
||||||
|
<!-- spring.application.name 作为参数 -->
|
||||||
|
<springProperty scope="context" name="APP_NAME" source="spring.application.name"/>
|
||||||
|
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<target>System.out</target>
|
||||||
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<!-- 按天压缩日志 -->
|
||||||
|
<appender name="ZIP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${LOG_HOME}/${APP_NAME}.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!--日志文件输出的文件名-->
|
||||||
|
<FileNamePattern>${LOG_HOME}/${APP_NAME}.log.%d{yyyy-MM-dd}.%i.log.zip</FileNamePattern>
|
||||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
|
<!-- or whenever the file size reaches 100MB -->
|
||||||
|
<maxFileSize>100MB</maxFileSize>
|
||||||
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<!-- 不压缩日志,保留7天 -->
|
||||||
|
<appender name="DEFAULT_INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!--日志文件输出的文件名-->
|
||||||
|
<FileNamePattern>${LOG_HOME}/${APP_NAME}.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||||
|
<maxHistory>7</maxHistory>
|
||||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
|
<!-- or whenever the file size reaches 100MB -->
|
||||||
|
<maxFileSize>100MB</maxFileSize>
|
||||||
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<!-- LOGSTASH,输出seuleth项,保留7天 -->
|
||||||
|
<appender name="LOGSTASH" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!--日志文件输出的文件名-->
|
||||||
|
<FileNamePattern>${JSON_LOG_HOME}/${APP_NAME}.json.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||||
|
<maxHistory>7</maxHistory>
|
||||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
|
<!-- or whenever the file size reaches 100MB -->
|
||||||
|
<maxFileSize>100MB</maxFileSize>
|
||||||
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
|
||||||
|
<providers>
|
||||||
|
<pattern>
|
||||||
|
<pattern>
|
||||||
|
{
|
||||||
|
"timestamp": "%d{yyyy-MM-dd HH:mm:ss.SSS}",
|
||||||
|
"severity": "%level",
|
||||||
|
"service": "${APP_NAME:-}",
|
||||||
|
"trace": "%X{X-B3-TraceId:-}",
|
||||||
|
"span": "%X{X-B3-SpanId:-}",
|
||||||
|
"parent": "%X{X-B3-ParentSpanId:-}",
|
||||||
|
"exportable": "%X{X-Span-Export:-}",
|
||||||
|
"pid": "${PID:-}",
|
||||||
|
"thread": "%thread",
|
||||||
|
"class": "%logger{40}",
|
||||||
|
"rest": "%message"
|
||||||
|
}
|
||||||
|
</pattern>
|
||||||
|
</pattern>
|
||||||
|
</providers>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<!-- 按天压缩Json日志 -->
|
||||||
|
<appender name="JSON_ZIP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${JSON_LOG_HOME}/${APP_NAME}.json.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!--日志文件输出的文件名-->
|
||||||
|
<FileNamePattern>${JSON_LOG_HOME}/${APP_NAME}.log.%d{yyyy-MM-dd}.%i.json.log.zip</FileNamePattern>
|
||||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
|
<!-- or whenever the file size reaches 100MB -->
|
||||||
|
<maxFileSize>100MB</maxFileSize>
|
||||||
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
|
||||||
|
<providers>
|
||||||
|
<pattern>
|
||||||
|
<pattern>
|
||||||
|
{
|
||||||
|
"timestamp": "%d{yyyy-MM-dd HH:mm:ss.SSS}",
|
||||||
|
"severity": "%level",
|
||||||
|
"service": "${APP_NAME:-}",
|
||||||
|
"trace": "%X{X-B3-TraceId:-}",
|
||||||
|
"span": "%X{X-B3-SpanId:-}",
|
||||||
|
"parent": "%X{X-B3-ParentSpanId:-}",
|
||||||
|
"exportable": "%X{X-Span-Export:-}",
|
||||||
|
"pid": "${PID:-}",
|
||||||
|
"thread": "%thread",
|
||||||
|
"class": "%logger{40}",
|
||||||
|
"rest": "%message"
|
||||||
|
}
|
||||||
|
</pattern>
|
||||||
|
</pattern>
|
||||||
|
</providers>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<target>System.err</target>
|
||||||
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<logger name="org.apache.http" level="error"/>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<level value="INFO"/>
|
||||||
|
<appender-ref ref="STDOUT"/>
|
||||||
|
<appender-ref ref="ZIP_FILE"/>
|
||||||
|
<appender-ref ref="DEFAULT_INFO_FILE"/>
|
||||||
|
<appender-ref ref="LOGSTASH"/>
|
||||||
|
<appender-ref ref="JSON_ZIP_FILE"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
@ -1 +1 @@
|
|||||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.df40209d.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.f161dd37.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.3b781528.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.38dbf364.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.df40209d.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.f161dd37.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.3b781528.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.38dbf364.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,122 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="news-detail-container container">
|
||||||
|
<div class="wrapper">
|
||||||
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||||
|
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||||
|
<el-breadcrumb-item :to="{ path: '/products' }">数据产品</el-breadcrumb-item>
|
||||||
|
<el-breadcrumb-item>详情</el-breadcrumb-item>
|
||||||
|
</el-breadcrumb>
|
||||||
|
<div class="content">
|
||||||
|
<div class="news-title">{{ detail.contentTitle }}</div>
|
||||||
|
<div class="news-upadate-time">{{ detail.updateTime }}</div>
|
||||||
|
<div v-html="detail.contentText" class="news-detail">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { contentInfo } from "@/api/homeView";
|
||||||
|
export default {
|
||||||
|
name: "NewsDetail",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
detail: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
var id = this.$route.params.contentId
|
||||||
|
this.getDetail(id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getDetail(id) {
|
||||||
|
contentInfo(id).then(res => {
|
||||||
|
this.detail = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.news-detail {
|
||||||
|
color: #333;
|
||||||
|
padding: 40px 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 21px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
p {
|
||||||
|
text-indent: 2em;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 35px;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p.ql-align-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.news-detail-container {
|
||||||
|
background: #F9F9F9;
|
||||||
|
padding: 40px 0;
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.el-breadcrumb {
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 1110px;
|
||||||
|
padding: 40px 68px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-height: 400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .06);
|
||||||
|
|
||||||
|
.news-title {
|
||||||
|
text-align: center;
|
||||||
|
height: 60px;
|
||||||
|
line-height: 60px;
|
||||||
|
font-size: 28px;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-upadate-time {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 14px;
|
||||||
|
padding: 20px 0;
|
||||||
|
text-align: center;
|
||||||
|
color: #666;
|
||||||
|
border-bottom: 1px solid #D8D8D8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-detail {
|
||||||
|
color: #333;
|
||||||
|
padding: 40px 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 21px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue