Commit cd521c9f authored by chenjb's avatar chenjb

初始化

parents
Pipeline #468 failed with stages
<?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>
<groupId>com.ekingwin</groupId>
<artifactId>bas-cloud-support</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>bas-cloud-support</name>
<url>http://www.ekingwin.com</url>
<properties>
<bas.version>3.1.3-SNAPSHOT</bas.version>
</properties>
<dependencies>
<dependency>
<groupId>com.ekingwin</groupId>
<artifactId>bas-cloud-infrastructure</artifactId>
<version>${bas.version}</version>
</dependency>
<dependency>
<groupId>io.github.swagger2markup</groupId>
<artifactId>swagger2markup</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>io.vavr</groupId>
<artifactId>vavr</artifactId>
<version>0.9.2</version>
</dependency>
<dependency>
<groupId>ch.netzwerg</groupId>
<artifactId>paleo-core</artifactId>
<version>0.10.2</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.6</version>
<configuration>
<sourceDirectory>./docs/asciidoc/generated</sourceDirectory>
<outputDirectory>./docs/asciidoc/html</outputDirectory>
<headerFooter>true</headerFooter>
<doctype>book</doctype>
<backend>html</backend>
<sourceHighlighter>coderay</sourceHighlighter>
<attributes>
<!--菜单栏在左边 -->
<toc>left</toc>
<!--多标题排列 -->
<toclevels>3</toclevels>
<!--自动打数字序号 -->
<sectnums>true</sectnums>
</attributes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.ttf</exclude>
<exclude>**/*.woff</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
//package com.ekingwin.bas.cloud.demo.resources;
//
//import java.security.Principal;
//
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.boot.builder.SpringApplicationBuilder;
//import org.springframework.boot.web.servlet.ServletComponentScan;
//import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
//import org.springframework.cache.annotation.EnableCaching;
//import org.springframework.context.annotation.ComponentScan;
//import org.springframework.transaction.annotation.EnableTransactionManagement;
//import org.springframework.web.WebApplicationInitializer;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RestController;
//
//import tk.mybatis.spring.annotation.MapperScan;
//
//import com.ekingwin.bas.cloud.infra.utils.web.UserUtils;
////import com.ekingwin.bas.cloud.security.oauth.TestFilter;
//
///**
// * demo项目,作为演示使用,各个项目可以参照改demo来构建启动项目,
// * 不要直接使用该项目进行开发,需要参考该项目的配置,重新创建一个新的项目进行开发
// * @author chenjb
// *
// */
//@RestController
//@SpringBootApplication
//@ComponentScan({"com.ekingwin.bas.cloud"})
//@MapperScan({"com.ekingwin.bas.cloud.**.dao"})
//@EnableAutoConfiguration
//@EnableTransactionManagement
//@EnableCaching
//@ServletComponentScan(basePackages = "com.ekingwin.bas.cloud")
//public class Demo2ServiceApplication extends SpringBootServletInitializer implements WebApplicationInitializer {
//
// @Override
// protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
// return application.sources(Demo2ServiceApplication.class);
// }
//
// public static void main(String[] args) {
// SpringApplication.run(Demo2ServiceApplication.class, args);
// }
//
// @GetMapping("/")
// public Principal user(Principal principal) {
// System.out.println(22222222);
// return principal;
// }
//}
//package com.ekingwin.bas.cloud.demo.resources.config;
//
//
//import javax.servlet.annotation.WebFilter;
//import javax.servlet.annotation.WebInitParam;
//
//import com.alibaba.druid.support.http.WebStatFilter;
//
//@WebFilter(filterName="druidWebStatFilter",urlPatterns="/*",
//initParams={
// @WebInitParam(name="exclusions",value="*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*")// 忽略资源
//})
//public class DruidFilter extends WebStatFilter {
//
//}
\ No newline at end of file
//package com.ekingwin.bas.cloud.demo.resources.config;
//
//import javax.servlet.annotation.WebInitParam;
//import javax.servlet.annotation.WebServlet;
//
//import com.alibaba.druid.support.http.StatViewServlet;
//@WebServlet(urlPatterns = "/druid/*",
// initParams={
//// @WebInitParam(name="allow",value="192.168.16.110,127.0.0.1"),// IP白名单 (没有配置或者为空,则允许所有访问)
//// @WebInitParam(name="deny",value="192.168.16.111"),// IP黑名单 (存在共同时,deny优先于allow)
// @WebInitParam(name="loginUsername",value="admin"),// 用户名
// @WebInitParam(name="loginPassword",value="admin"),// 密码
// @WebInitParam(name="resetEnable",value="false")// 禁用HTML页面上的“Reset All”功能
// })
//public class DruidServlet extends StatViewServlet {
//
// /**
// *
// */
// private static final long serialVersionUID = 3027129555878842910L;
//
//}
\ No newline at end of file
server.port=8001
#database
spring.datasource.url=jdbc:mysql://222.187.245.149:3306/mid_end?characterEncoding=utf-8
spring.datasource.username=mid_end
spring.datasource.password=Ekingwin123
#\u6253\u5370mybatis\u7684sql\u8bed\u53e5\uff08\u4e0e\u4e0b\u9762\u7684\u65e5\u5fd7\u914d\u7f6e\u4e8c\u9009\u4e00\u5373\u53ef\uff09
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#\u65e5\u5fd7
logging.level.root=INFO
#\u8bbe\u4e3aDEBUG\uff0c\u53ef\u6253\u5370mybatis\u7684sql\u8bed\u53e5
logging.level.com.ekingwin.bas=DEBUG
logging.level.jdbc.sqlonly=INFO
logging.level.org.quartz=WARN
#redis
spring.redis.host=180.101.123.121
spring.redis.port=6379
spring.redis.password=Password1
#ldap_config
bas.cloud.ldap.url=ldap://180.101.123.0:389
bas.cloud.ldap.userDn=cn=admin,dc=ekingwin,dc=com
bas.cloud.ldap.userPwd=Ekingwin,123
#mail
spring.mail.host=smtp.sina.cn
spring.mail.username=cjbbobo@sina.com
spring.mail.password=mgf3cUBA
#activemq
bas.cloud.mq.activemq.userName=admin
bas.cloud.mq.activemq.password=admin
bas.cloud.mq.activemq.url=tcp://localhost:61616
############################################BASIC START############################################
spring.profiles.active=dev
spring.application.name=test
server.servlet.context-path=/test
management.security.enabled=false
############################################BASIC END############################################
############################################MYBATIS START############################################
#mybatis
mybatis.type-aliases-package=com.ekingwin.bas.cloud
mybatis.mapper-locations=classpath*:/mapper/**/*Mapper.xml
mapper.mappers=com.ekingwin.bas.mapper.BasMapper
mapper.not-empty=false
mapper.identity=SELECT fn_uuid()
mapper.before=true
pagehelper.helperDialect=mysql
#\u5206\u9875\u5408\u7406\u5316\uff0c\u9488\u5bf9\u4e0d\u5408\u7406\u7684\u4ee3\u7801\u81ea\u52a8\u5904\u7406
pagehelper.reasonable=true
#\u5206\u9875\u63d2\u4ef6\u4f1a\u4ece\u67e5\u8be2\u65b9\u6cd5\u7684\u53c2\u6570\u503c\u4e2d\uff0c\u81ea\u52a8\u6839\u636e\u4e0a\u9762 params \u914d\u7f6e\u7684\u5b57\u6bb5\u4e2d\u53d6\u503c\uff0c\u67e5\u627e\u5230\u5408\u9002\u7684\u503c\u65f6\u5c31\u4f1a\u81ea\u52a8\u5206\u9875\u3002
pagehelper.supportMethodsArguments=true
############################################MYBATIS END############################################
############################################MAIL START############################################
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=false
spring.mail.properties.mail.smtp.starttls.required=false
bas.cloud.mail.mq.listener=false
############################################MAIL END############################################
############################################DATASOURCE START############################################
#\u6307\u5b9a\u521d\u59cb\u5316\u6570\u636e\u6e90\uff0c\u662f\u5426\u7528data.sql\u6765\u521d\u59cb\u5316\uff0c\u9ed8\u8ba4: true
#\u5982\u679c\u4f60\u7684\u5e94\u7528\u4e0d\u4f9d\u8d56\u4e8e\u6570\u636e\u5e93\uff0c\u5219\u4e00\u5b9a\u8981\u662ffalse\uff0c\u5426\u5219\u4f1a\u62a5\u9519
spring.datasource.initialize=false
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.freemarker.cache=true
spring.freemarker.suffix=.ftl
############################################FREEMARKER END############################################
############################################LDAP START############################################
#ldap_config
bas.cloud.ldap.base=dc=ekingwin,dc=com
bas.cloud.ldap.userObjectclass=inetOrgPerson,person,top,shadowAccount
bas.cloud.ldap.userDefaultDn=ou=user
bas.cloud.ldap.userSearchBase=ou=user,dc=ekingwin,dc=com
############################################LDAP END############################################
############################################SECURITY START############################################
bas.security.authorityMode=white
############################################SECURITY END############################################
############################################REDIS START############################################
#\u8fde\u63a5\u6c60\u6700\u5927\u8fde\u63a5\u6570\uff08\u4f7f\u7528\u8d1f\u503c\u8868\u793a\u6ca1\u6709\u9650\u5236\uff09
spring.redis.lettuce.pool.max-active=100
#\u8fde\u63a5\u6c60\u4e2d\u7684\u6700\u5927\u7a7a\u95f2\u8fde\u63a5
spring.redis.lettuce.pool.max-idle=100
#\u8fde\u63a5\u6c60\u4e2d\u7684\u6700\u5c0f\u7a7a\u95f2\u8fde\u63a5
spring.redis.lettuce.pool.min-idle=50
#\u8fde\u63a5\u6c60\u6700\u5927\u963b\u585e\u7b49\u5f85\u65f6\u95f4\uff08\u4f7f\u7528\u8d1f\u503c\u8868\u793a\u6ca1\u6709\u9650\u5236\uff09
spring.redis.lettuce.pool.max-wait=6000
spring.redis.timeout=5000
spring.redis.database=0
############################################REDIS END############################################
bas.cloud.base.app.desc=test
bas.cloud.base.app.version=1.0.0
bas.security.oauth.server=http://localhost:8030/security
bas.security.logoutSuccessUrl=http://localhost:8030/security/login
security.basic.enabled=false
security.oauth2.client.clientId=normal-app2
security.oauth2.client.clientSecret=secret
security.oauth2.client.accessTokenUri=http://localhost:8030/security/oauth/token
security.oauth2.client.userAuthorizationUri=http://localhost:8030/security/oauth/authorize
security.oauth2.resource.userInfoUri=http://localhost:8030/security/user/profile
\ No newline at end of file
88888888ba, 88888888888 88b d88 ,ad8888ba,
88 `"8b 88 888b d888 d8"' `"8b
88 `8b 88 88`8b d8'88 d8' `8b
88 88 88aaaaa 88 `8b d8' 88 88 88
88 88 88""""" 88 `8b d8' 88 88 88
88 8P 88 88 `8b d8' 88 Y8, ,8P
88 .a8P 88 88 `888' 88 Y8a. .a8P
88888888Y"' 88888888888 88 `8' 88 `"Y8888Y"'
\ No newline at end of file
spring:
cloud:
consul:
config:
enabled: false
discovery:
register: false
application:
name: bas-cloud-demo
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: always
\ No newline at end of file
This diff is collapsed.
${baseURI}${token}
\ No newline at end of file
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCTb5LusXlzft4n9zg7bmeB39QD
fKlBTZQdwiG+4w9EKxTKYpbP4hPgZrK9/lYYPTtYjb9FYVUTRKWBMCiL16dEtB6N
0hpbYuT2UCiiIYqxGrBTdVbBGEY7L20bvGu8nur3Zqs1A/710icS18ZdvZINyNa3
o3oiQruIGm0lokrrxQIDAQAB
-----END PUBLIC KEY-----
\ No newline at end of file
package com.ekingwin.bas.cloud.demo.resources;
import io.github.swagger2markup.GroupBy;
import io.github.swagger2markup.Language;
import io.github.swagger2markup.Swagger2MarkupConfig;
import io.github.swagger2markup.Swagger2MarkupConverter;
import io.github.swagger2markup.builder.Swagger2MarkupConfigBuilder;
import io.github.swagger2markup.markup.builder.MarkupLanguage;
import org.junit.Test;
import java.net.URL;
import java.nio.file.Paths;
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = Demo2ServiceApplication.class)
public class TestApiExportService{
// swagger-ui.html页面中能找到此链接
// private final static String SWAGGER_URI = "http://middleware.jiucaiyun.cn/mid-platform/v2/api-docs";
private final static String SWAGGER_URI = "http://localhost:8000/test/v2/api-docs";
private final static String TARGET_PATH = "./docs/asciidoc/generated";
/**
* 生成AsciiDocs格式文档
* @throws Exception
*/
@Test
public void generateAsciiDocs() throws Exception {
// 输出Ascii格式
Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder()
.withMarkupLanguage(MarkupLanguage.ASCIIDOC)
.withOutputLanguage(Language.ZH)
.withPathsGroupedBy(GroupBy.TAGS)
.withGeneratedExamples()
.withoutInlineSchema()
.build();
Swagger2MarkupConverter converter = Swagger2MarkupConverter
.from(new URL(SWAGGER_URI))
.withConfig(config)
.build();
converter.toFolder(Paths.get(TARGET_PATH));
converter.toFile(Paths.get(TARGET_PATH, "all"));
}
// /**
// * 生成Markdown格式文档
// * @throws Exception
// */
// @Test
// public void generateMarkdownDocs() throws Exception {
// // 输出Markdown格式
// Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder()
// .withMarkupLanguage(MarkupLanguage.MARKDOWN)
// .withOutputLanguage(Language.ZH)
// .withPathsGroupedBy(GroupBy.TAGS)
// .withoutPathSecuritySection()
// .withGeneratedExamples()
// .withoutInlineSchema().withAnchorPrefix("a")
//// .withListDelimiter()
//// .withSeparatedDefinitions()
//// .withSeparatedOperations()
// .build();
//
// Swagger2MarkupConverter.from(new URL("http://localhost:8000/test/v2/api-docs"))
// .withConfig(config)
// .build()
// .toFolder(Paths.get("./docs/mddoc/generated"));
// }
//
// /**
// * 生成Markdown格式文档,并汇总成一个文件
// * @throws Exception
// */
// @Test
// public void generateMarkdownDocsToFile() throws Exception {
// // 输出Markdown到单文件
// Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder()
// .withMarkupLanguage(MarkupLanguage.MARKDOWN)
// .withOutputLanguage(Language.ZH)
// .withPathsGroupedBy(GroupBy.TAGS)
// .withoutPathSecuritySection()
// .withGeneratedExamples()
// .withoutInlineSchema()
// .build();
//
// Swagger2MarkupConverter.from(new URL("http://localhost:8000/test/v2/api-docs"))
// .withConfig(config)
// .build()
// .toFile(Paths.get("./docs/mddoc/generated/all"));
// }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment