first commit
This commit is contained in:
1
template/entrance/README.md
Normal file
1
template/entrance/README.md
Normal file
@@ -0,0 +1 @@
|
||||
> 应用入口
|
||||
15
template/entrance/mq/pom.xml
Normal file
15
template/entrance/mq/pom.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}-entrance</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>{{ .artifactId }}-entrance-mq</artifactId>
|
||||
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,4 @@
|
||||
存放消息消费者
|
||||
```
|
||||
\-- *Consumer.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放DTOConverter
|
||||
```
|
||||
\-- *Converter.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放DTO
|
||||
```
|
||||
\-- *DTO.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放工具类
|
||||
```
|
||||
\-- *Util.java
|
||||
```
|
||||
24
template/entrance/pom.xml
Normal file
24
template/entrance/pom.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
</parent>
|
||||
<artifactId>{{ .artifactId }}-entrance</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}-common</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<modules>
|
||||
<module>mq</module>
|
||||
<module>web</module>
|
||||
</modules>
|
||||
</project>
|
||||
40
template/entrance/web/pom.xml
Normal file
40
template/entrance/web/pom.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}-entrance</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>{{ .artifactId }}-entrance-web</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.toco</groupId>
|
||||
<artifactId>vs-sqlmapper-spring</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}-entrance-mq</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vs</groupId>
|
||||
<artifactId>vs-mock-web</artifactId>
|
||||
<version>${vs.mock.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vs</groupId>
|
||||
<artifactId>vs-debug-agent</artifactId>
|
||||
<version>${vs.debug.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vs</groupId>
|
||||
<artifactId>vs-debug-plugin</artifactId>
|
||||
<version>${vs.debug.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,45 @@
|
||||
package {{ .package }}.entrance.web;
|
||||
|
||||
import com.vs.debug.stack.config.EnableVSReplayConfiguration;
|
||||
import com.vs.sqlmapper.spring.DataSourceConfig;
|
||||
import com.vs.sqlmapper.spring.scan.VSDaoBeanScan;
|
||||
import com.vs.mock.config.EnableVSMockConfiguration;
|
||||
import com.vs.sqlmapper.spring.express.EnableVSMockExpress;
|
||||
import com.vs.agent.TocoAgentInitializer;
|
||||
|
||||
import com.vs.debug.stack.agent.LogStackContextInvokeRecorder;
|
||||
import com.vs.debug.stack.agent.MethodVisitorHandlerFilter;
|
||||
import com.vs.debug.stack.agent.StackContextInvokeRecorder;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@SpringBootApplication(scanBasePackages = {"{{.groupId}}", "com.vs"})
|
||||
@VSDaoBeanScan(basePackages = {"com.vs","{{.groupId}}"})
|
||||
@Import(DataSourceConfig.class)
|
||||
@EnableVSReplayConfiguration
|
||||
@EnableVSMockConfiguration
|
||||
@EnableVSMockExpress
|
||||
public class AppApplication{
|
||||
|
||||
// @Bean(name = "stackContextInvokeRecorder")
|
||||
// public StackContextInvokeRecorder createStackContextInvokeRecorder() throws Exception {
|
||||
// return new LogStackContextInvokeRecorder(); // 可以根据需求扩展实现
|
||||
// }
|
||||
|
||||
@Bean
|
||||
public MethodVisitorHandlerFilter createMethodVisitorHandlerFilter() {
|
||||
StackContextInvokeRecorder stackContextInvokeRecorder = new LogStackContextInvokeRecorder();
|
||||
return new MethodVisitorHandlerFilter(stackContextInvokeRecorder);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication application = new SpringApplication(AppApplication.class);
|
||||
application.addInitializers(new TocoAgentInitializer());
|
||||
application.run(args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package {{ .package }}.entrance.web.response;
|
||||
|
||||
import com.libawall.framework.core.base.result.ResultDTO;
|
||||
import com.vs.common.util.rpc.pub.PublicInterface;
|
||||
import com.vs.ox.common.utils.ObjectMapperFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.http.server.ServletServerHttpResponse;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
|
||||
import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* 处理 Controller 里的返回值,从 Object 包装为 ResultDTO 类型
|
||||
*/
|
||||
@Slf4j
|
||||
public class ResponseJsonMethodReturnValueHandler implements HandlerMethodReturnValueHandler, InitializingBean {
|
||||
private HttpMessageConverter messageConverter;
|
||||
|
||||
public ResponseJsonMethodReturnValueHandler() {
|
||||
}
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
if (this.messageConverter == null) {
|
||||
this.messageConverter = new MappingJackson2HttpMessageConverter(ObjectMapperFactory.getDefaultObjectMapper());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean supportsReturnType(MethodParameter returnType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
|
||||
Method method = returnType.getMethod();
|
||||
//目前只处理自动生成接口
|
||||
PublicInterface annotation = method.getAnnotation(PublicInterface.class);
|
||||
if (annotation != null) {
|
||||
mavContainer.setRequestHandled(true);
|
||||
Object result = returnValue == null ? ResultDTO.ok(Collections.emptyMap()) : ResultDTO.ok((returnValue));
|
||||
ServletServerHttpResponse response = new ServletServerHttpResponse(webRequest.getNativeResponse(HttpServletResponse.class));
|
||||
this.messageConverter.write(result, new MediaType(MediaType.APPLICATION_JSON, Collections.singletonMap("charset", "utf-8")), response);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package {{ .package }}.entrance.web.response;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.method.annotation.MapMethodProcessor;
|
||||
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.ViewNameMethodReturnValueHandler;
|
||||
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
public class ResponseJsonWebMvcConfiguration implements ApplicationContextAware, WebMvcConfigurer {
|
||||
private RequestMappingHandlerAdapter requestMappingHandlerAdapter;
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
void init() {
|
||||
List<HandlerMethodReturnValueHandler> returnValueHandlers = this.requestMappingHandlerAdapter.getReturnValueHandlers();
|
||||
Iterator<HandlerMethodReturnValueHandler> iterator = returnValueHandlers.iterator();
|
||||
List<HandlerMethodReturnValueHandler> newProcessors = new ArrayList<>();
|
||||
while (iterator.hasNext()) {
|
||||
HandlerMethodReturnValueHandler next = iterator.next();
|
||||
//在controller中直接返回map,不被默认的MapMethodProcessor拦截
|
||||
if (next instanceof MapMethodProcessor ||
|
||||
//在controller中直接返回String,不被默认的ViewNameMethodReturnValueHandler拦截
|
||||
next instanceof ViewNameMethodReturnValueHandler) {
|
||||
} else {
|
||||
newProcessors.add(next);
|
||||
}
|
||||
}
|
||||
this.requestMappingHandlerAdapter.setReturnValueHandlers(newProcessors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) {
|
||||
ResponseJsonMethodReturnValueHandler responseJsonMethodReturnValueHandler = new ResponseJsonMethodReturnValueHandler();
|
||||
responseJsonMethodReturnValueHandler.afterPropertiesSet();
|
||||
returnValueHandlers.add(responseJsonMethodReturnValueHandler);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@Bean
|
||||
ServletContextListener listener1() {
|
||||
return new ServletContextListener() {
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent sce) {
|
||||
requestMappingHandlerAdapter = applicationContext.getBean(RequestMappingHandlerAdapter.class);
|
||||
init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextDestroyed(ServletContextEvent sce) {
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
server.port=8082
|
||||
endpoints.enabled=false
|
||||
server.forward-headers-strategy=framework
|
||||
#custom corss-domain headers, split by ','
|
||||
cross.domain.headers=
|
||||
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration
|
||||
|
||||
base.package={{.groupId}}
|
||||
mock.enabled=true
|
||||
# datasource
|
||||
spring.datasource.url=jdbc:mysql://${DB_HOST:10.0.2.201:3306}/${DB_DATABASE:hande_test}?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
spring.datasource.username=${DB_USER:hande_test_user}
|
||||
spring.datasource.password=${DB_PASSWORD:Yu0FvhjUQDGdnmm5}
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource
|
||||
spring.datasource.tomcat.max-age=3600000
|
||||
spring.jpa.open-in-view=false
|
||||
management.metrics.export.simple.enabled=false
|
||||
spring.redis.host=${REDIS_HOST:redis.byteawake.com}
|
||||
|
||||
|
||||
# flyway
|
||||
spring.flyway.enabled=false
|
||||
spring.flyway.outOfOrder=true
|
||||
spring.flyway.baselineOnMigrate=true
|
||||
spring.upload.file.path=/data/upload
|
||||
spring.exception.isHtmlRequired=false
|
||||
spring.main.lazy-initialization=true
|
||||
application.name=libawall
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
spring.url.aaa=http://localhost:8080
|
||||
spring.websocket.enabled=false
|
||||
spring.application.name=libawall
|
||||
spring.security.enabled=false
|
||||
spring.login.security.enableRoleRequired=false
|
||||
spring.login.security.login=false
|
||||
spring.security.authignored=/api/**,/rpc/**
|
||||
|
||||
#rocketmq
|
||||
rocketmq.name-server=${ROCKETMQ_HOST:10.0.2.221:9876;10.0.2.222:9876;10.0.2.223:9876}
|
||||
rocketmq.topic=${DB_DATABASE:hande_test}
|
||||
rocketmq.consumerGroup=CID_handeTest
|
||||
rocketmq.tag=*
|
||||
rocketmq.producer.group=PID_handeTest
|
||||
spring.main.allow-circular-references=true
|
||||
spring.login.security.csrf=false
|
||||
|
||||
#elasticsearch
|
||||
#essql.hosts=${OPENSEARCH_HOST:10.0.2.221,10.0.2.222,10.0.2.223}
|
||||
#essql.port=9200
|
||||
#essql.username=${OPENSEARCH_USER:admin}
|
||||
#essql.password=${OPENSEARCH_PASSWORD:dnZkaNVK}
|
||||
#essql.scheme=${OPENSEARCH_SCHEME:https}
|
||||
|
||||
#get user config
|
||||
get_user_uri={}
|
||||
|
||||
#request header
|
||||
out.request.headers=
|
||||
#response header
|
||||
out.response.headers=Content-Type
|
||||
#eg:https://vsstudio.teitui.com
|
||||
out.host=
|
||||
|
||||
#xxljob
|
||||
xxl.job.admin.addresses=${XXL_JOB_ADMIN_ADDRESS:https://xxljob.teitui.com/xxl-job-admin}
|
||||
xxl.job.executor.port=9999
|
||||
xxl.job.executor.appname=handeTest
|
||||
xxl.job.executor.title=handeTest
|
||||
xxl.job.accessToken=default_token
|
||||
xxl.job.admin.username=${XXL_JOB_ADMIN_USER:admin}
|
||||
xxl.job.admin.password=${XXL_JOB_ADMIN_PASSWORD:123456}
|
||||
|
||||
#redis
|
||||
redis-config.pool.hostAndPort=${REDIS_HOST:redis.byteawake.com:6379}
|
||||
redis-config.pool.password=${REDIS_PASSWORD:}
|
||||
redis-config.pool.maxTotal=100
|
||||
redis-config.pool.maxIdle=10
|
||||
redis-config.pool.minIdle=10
|
||||
redis-config.pool.maxWaitMillis=10000
|
||||
redis-config.pool.softMinEvictableIdleTimeMillis=10000
|
||||
redis-config.pool.testOnBorrow=true
|
||||
redis-config.pool.testOnReturn=true
|
||||
redis-config.pool.testWhileIdle=true
|
||||
redis-config.pool.timeBetweenEvictionRunsMillis=30000
|
||||
redis-config.pool.minEvictableIdleTimeMillis=1800000
|
||||
redis-config.pool.numTestsPerEvictionRun=3
|
||||
redis-config.pool.blockWhenExhausted=true
|
||||
redis-config.pool.jmxEnabled=true
|
||||
redis-config.pool.lifo=true
|
||||
|
||||
#flow config
|
||||
liteflow.rule-source=el_json:com.vs.flow.FlowRuleSource
|
||||
liteflow.print-banner=false
|
||||
liteflow.monitor.enable-log=true
|
||||
@@ -0,0 +1,78 @@
|
||||
server.port=8080
|
||||
endpoints.enabled=false
|
||||
server.forward-headers-strategy=framework
|
||||
#custom corss-domain headers, split by ','
|
||||
cross.domain.headers=
|
||||
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration
|
||||
|
||||
base.package={{.groupId}}
|
||||
# datasource
|
||||
spring.datasource.url=jdbc:mysql://${DB_HOST:10.0.2.201:3306}/${DB_DATABASE:hande_test}?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
spring.datasource.username=${DB_USER:hande_test_user}
|
||||
spring.datasource.password=${DB_PASSWORD:Yu0FvhjUQDGdnmm5}
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource
|
||||
spring.datasource.tomcat.max-age=3600000
|
||||
spring.jpa.open-in-view=false
|
||||
|
||||
# flyway
|
||||
spring.flyway.enabled=false
|
||||
spring.flyway.outOfOrder=true
|
||||
spring.flyway.baselineOnMigrate=true
|
||||
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
#rocketmq
|
||||
rocketmq.name-server=${ROCKETMQ_HOST}
|
||||
rocketmq.topic=hande_test
|
||||
rocketmq.consumerGroup=CID_handeTest
|
||||
rocketmq.tag=*
|
||||
rocketmq.producer.group=PID_handeTest
|
||||
|
||||
#elasticsearch
|
||||
#essql.hosts=${OPENSEARCH_HOST}
|
||||
#essql.port=9200
|
||||
#essql.username=${OPENSEARCH_USER:admin}
|
||||
#essql.password=${OPENSEARCH_PASSWORD:admin}
|
||||
#essql.scheme=${OPENSEARCH_SCHEME:https}
|
||||
|
||||
#get user config
|
||||
get_user_uri={}
|
||||
|
||||
#request header
|
||||
out.request.headers=
|
||||
#response header
|
||||
out.response.headers=Content-Type
|
||||
out.host=
|
||||
|
||||
#xxljob
|
||||
xxl.job.admin.addresses=${XXL_JOB_ADMIN_ADDRESS}
|
||||
xxl.job.executor.port=9999
|
||||
xxl.job.executor.appname=handeTest
|
||||
xxl.job.executor.title=handeTest
|
||||
xxl.job.accessToken=default_token
|
||||
xxl.job.admin.username=${XXL_JOB_ADMIN_USER:admin}
|
||||
xxl.job.admin.password=${XXL_JOB_ADMIN_PASSWORD:123456}
|
||||
|
||||
#redis
|
||||
redis-config.pool.hostAndPort=${REDIS_HOST}
|
||||
redis-config.pool.password=${REDIS_PASSWORD}
|
||||
redis-config.pool.maxTotal=100
|
||||
redis-config.pool.maxIdle=10
|
||||
redis-config.pool.minIdle=10
|
||||
redis-config.pool.maxWaitMillis=10000
|
||||
redis-config.pool.softMinEvictableIdleTimeMillis=10000
|
||||
redis-config.pool.testOnBorrow=true
|
||||
redis-config.pool.testOnReturn=true
|
||||
redis-config.pool.testWhileIdle=true
|
||||
redis-config.pool.timeBetweenEvictionRunsMillis=30000
|
||||
redis-config.pool.minEvictableIdleTimeMillis=1800000
|
||||
redis-config.pool.numTestsPerEvictionRun=3
|
||||
redis-config.pool.blockWhenExhausted=true
|
||||
redis-config.pool.jmxEnabled=true
|
||||
redis-config.pool.lifo=true
|
||||
|
||||
#flow config
|
||||
liteflow.rule-source=el_json:com.vs.flow.FlowRuleSource
|
||||
liteflow.print-banner=false
|
||||
liteflow.monitor.enable-log=true
|
||||
@@ -0,0 +1,79 @@
|
||||
server.port=8080
|
||||
endpoints.enabled=false
|
||||
server.forward-headers-strategy=framework
|
||||
#custom corss-domain headers, split by ','
|
||||
cross.domain.headers=
|
||||
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration
|
||||
|
||||
base.package={{.groupId}}
|
||||
# datasource
|
||||
spring.datasource.url=jdbc:mysql://${DB_HOST:10.0.2.201:3306}/${DB_DATABASE:hande_test}?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
spring.datasource.username=${DB_USER:hande_test_user}
|
||||
spring.datasource.password=${DB_PASSWORD:Yu0FvhjUQDGdnmm5}
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource
|
||||
spring.datasource.tomcat.max-age=3600000
|
||||
spring.jpa.open-in-view=false
|
||||
|
||||
# flyway
|
||||
spring.flyway.enabled=false
|
||||
spring.flyway.outOfOrder=true
|
||||
spring.flyway.baselineOnMigrate=true
|
||||
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
#rocketmq
|
||||
rocketmq.name-server=${ROCKETMQ_HOST:10.0.2.221:9876;10.0.2.222:9876;10.0.2.223:9876}
|
||||
rocketmq.topic=${MYSQL_DATABASE:hande_test}
|
||||
rocketmq.consumerGroup=CID_handeTest
|
||||
rocketmq.tag=*
|
||||
rocketmq.producer.group=PID_handeTest
|
||||
|
||||
#elasticsearch
|
||||
#essql.hosts=${OPENSEARCH_HOST:10.0.2.221,10.0.2.222,10.0.2.223}
|
||||
#essql.port=9200
|
||||
#essql.username=${OPENSEARCH_USER:admin}
|
||||
#essql.password=${OPENSEARCH_PASSWORD:dnZkaNVK}
|
||||
#essql.scheme=${OPENSEARCH_SCHEME:https}
|
||||
|
||||
#get user config
|
||||
get_user_uri={}
|
||||
|
||||
#request header
|
||||
out.request.headers=
|
||||
#response header
|
||||
out.response.headers=Content-Type
|
||||
#eg:https://vsstudio.teitui.com
|
||||
out.host=
|
||||
|
||||
#xxljob
|
||||
xxl.job.admin.addresses=${XXL_JOB_ADMIN_ADDRESS:https://xxljob.teitui.com/xxl-job-admin}
|
||||
xxl.job.executor.port=9999
|
||||
xxl.job.executor.appname=handeTest
|
||||
xxl.job.executor.title=handeTest
|
||||
xxl.job.accessToken=default_token
|
||||
xxl.job.admin.username=${XXL_JOB_ADMIN_USER:admin}
|
||||
xxl.job.admin.password=${XXL_JOB_ADMIN_PASSWORD:123456}
|
||||
|
||||
#redis
|
||||
redis-config.pool.hostAndPort=${REDIS_HOST:redis.byteawake.com:6379}
|
||||
redis-config.pool.password=${REDIS_PASSWORD:}
|
||||
redis-config.pool.maxTotal=100
|
||||
redis-config.pool.maxIdle=10
|
||||
redis-config.pool.minIdle=10
|
||||
redis-config.pool.maxWaitMillis=10000
|
||||
redis-config.pool.softMinEvictableIdleTimeMillis=10000
|
||||
redis-config.pool.testOnBorrow=true
|
||||
redis-config.pool.testOnReturn=true
|
||||
redis-config.pool.testWhileIdle=true
|
||||
redis-config.pool.timeBetweenEvictionRunsMillis=30000
|
||||
redis-config.pool.minEvictableIdleTimeMillis=1800000
|
||||
redis-config.pool.numTestsPerEvictionRun=3
|
||||
redis-config.pool.blockWhenExhausted=true
|
||||
redis-config.pool.jmxEnabled=true
|
||||
redis-config.pool.lifo=true
|
||||
|
||||
#flow config
|
||||
liteflow.rule-source=el_json:com.vs.flow.FlowRuleSource
|
||||
liteflow.print-banner=false
|
||||
liteflow.monitor.enable-log=true
|
||||
@@ -0,0 +1,10 @@
|
||||
spring.profiles.active=local
|
||||
envs=local,remote,online,custom
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
project_id=${projectId}
|
||||
project_name=handeTest
|
||||
check=true
|
||||
|
||||
spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER
|
||||
|
||||
com.toco.agent.attach=true
|
||||
26
template/entrance/web/src/main/resources/visitor_agents.conf
Normal file
26
template/entrance/web/src/main/resources/visitor_agents.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
[debug.server.host]
|
||||
// 这块,目前基本是写死这样的配置,不要修改
|
||||
vs.debug.host = http://vsstudio.teitui.com
|
||||
|
||||
[debug.proxy.custom]
|
||||
// 定义需要增强的classs,没有增加的class不记录堆栈
|
||||
// 一般明显不需要记录的class,配置成: class.name=false
|
||||
// 正则表述式支持,请注意书写
|
||||
// class.pattern = true 表示要增强记录堆栈的
|
||||
|
||||
// 自定义的增加的类
|
||||
|
||||
com.vs.entrance.controller.env.register.DebugEnvRegisterTask=false
|
||||
com.vs.common.util.rpc.pub.PublicInterfaceExecutor = true +[execute]
|
||||
com.vs.common.util.rpc.pub.PublicInterfaceFilter = true +[doFilter]
|
||||
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter=true
|
||||
|
||||
com.vs.sqlmapper.core.SqlManagerImpl = true +[sqlWatcher]
|
||||
com.vs.common.util.rpc.RpcMethodExecutor = true
|
||||
|
||||
[debug.proxy.service]
|
||||
// 默认支持serivce下面的所有类,放到最后一行
|
||||
|
||||
.*?\.service[\.\w_]+ = true -[set*, get*]
|
||||
.*?\.controller[\.\w_]+ = true -[set*, get*]
|
||||
.*?\.hibernate[\.\w_]+ = false
|
||||
Reference in New Issue
Block a user