Giter VIP home page Giter VIP logo

minbox-projects / api-boot Goto Github PK

View Code? Open in Web Editor NEW
526.0 28.0 152.0 2.17 MB

“ ApiBoot”是为接口服务而生的,基于“ SpringBoot”完成扩展和自动配置,内部封装了一系列的开箱即用Starters。

Home Page: https://apiboot.minbox.org

License: Apache License 2.0

Java 97.16% TSQL 2.65% XSLT 0.19%
springboot mybatis spring-security spring-cloud redis rate-limiter logging quartz oauth2 mybatis-pageable oss qps sms datasource-switch

api-boot's Introduction

ApiBoot: Born to build Api services as components

Ci Builder

What is ApiBoot ?

ApiBoot is a landing solution for interface services. It provides a series of out-of-the-box components to simplify the integration of mainstream third-party frameworks through encapsulation, thereby improving developer development efficiency, learning costs, and lowering the entry threshold. Ready to use! ! !

Developers who have a simple understanding of Spring Boot can write secure and stable interface services, which can provide rich security interfaces for multiple endpoints such as mobile terminals and web pages.

ApiBoot depends on SpringBoot and can be used to build standalone Java applications.

Vision:

  • Provide low-threshold third-party framework integration solutions for Java developers, so that the threshold for the use of complex framework integration is lower.
  • Out of the box, the mainstream framework is encapsulated inside, just add dependencies and simple configuration to use.
  • Each component can be used independently, no longer redundant your application.
  • Can easily and quickly build a secure restful resource interface service.
  • It can be used to build SpringCloud microservice service instances.
  • To contribute to open source, I hope that the open source framework can help more developers.

Installation & Getting Started

Please check the use of componentsOfficial Reference Document,Get started please visitThe first ApiBoot application

If you are using Maven to build the project, you need to add the version dependency of ApiBoot to your pom.xml file as follows:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.minbox.framework</groupId>
      <artifactId>api-boot-dependencies</artifactId>
      <version>${lastVersion}</version>
      <scope>import</scope>
      <type>pom</type>
    </dependency>
  </dependencies>
</dependencyManagement>

Note:lastVersionNeed to be replaced with the latest ApiBoot version,Please visitVersion dependencies- 2. Get the latest ApiBoot dependencies

After the version dependency is added, we can then add the required ApiBoot components in the project. The following is an example of using the distributed link component minbox-logging:

<dependencies>
  <!--ApiBoot MinBox Logging-->
  <dependency>
    <groupId>org.minbox.framework</groupId>
    <artifactId>api-boot-starter-logging</artifactId>
  </dependency>
</dependencies>

After adding the components, we can find the corresponding component documentation according to official reference document to configure and use.

Get help

If you encounter problems while using ApiBoot, you can get help through the following channels!

Create Issues

Everyone may ask different questions, but there will be some of the same questions. If you want to ask questions, please follow the suggestions below:

  • Before submitting an issue, please search for any issues in the issues.
  • Please provide as much information as possible about ApiBoot when asking your question, such as: ApiBoot version, JDK, use components, etc.
  • If you need to paste the code when asking questions, please try to use the markdown syntax ``` escape character.

Source code construction

The official version of ApiBoot will be released to Maven Center. If you want to use the latest version of ApiBoot (the version is not released), you can directly build and install it to local use through the source code. The prerequisites are as follows:

# Download master branch source code to local
➜ git clone https://github.com/minbox-projects/api-boot.git
➜ cd api-boot
# install
➜ mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dgpg.skip

License

ApiBoot is written under the Apache2 open source license。

OpenSource Support

api-boot's People

Contributors

hengboy avatar leshalv avatar linianyang avatar magebyte-zero avatar reginfos avatar suncunhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-boot's Issues

org.minbox.framework.logging.client.http.openfeign.LoggingOpenFeignInterceptor 异步执行 feign请求 抛异常

错误信息:
ERROR 22536 --- [ task-1] .a.i.SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method:
异步执行feign请求时:

java.lang.NullPointerException: null
at org.minbox.framework.logging.client.http.openfeign.LoggingOpenFeignInterceptor.apply(LoggingOpenFeignInterceptor.java:49)
at feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:169)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:99)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:78)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at com.sun.proxy.$Proxy206.getSmsTemplate(Unknown Source)

org.minbox.framework.logging.client.http.openfeign.LoggingOpenFeignInterceptor
line: MinBoxLog log = LogThreadLocal.get();
因为异步执行,不在同个线程中,获取MinBoxLog log为空
是否jar包可以加个判 log是否为空处理

ApiBoot Mybatis Enhance 影响原生mybatis使用??我试着使用xml文件自定义sql的方式,报错Invalid bound statement (not found)

ApiBoot Mybatis Enhance是一款数据持久化、动态查询结构化框架,用户操作单表、多表关联的数据,在Mybatis的基础上进行封装扩展, 不影响任何原生的使用,使用后完全替代mybatis-core、mybatis-spring以及mybatis-spring-boot-starter

当我试着使用xml格式的方式,报错Invalid bound statement (not found)

功能增加

希望能够继承微信登录等等以及缓存。

集成druid-spring-boot-starter 1.2.8 ,无法正常登陆,总是提示用户名密码错误,同样的配置在springboot中整合druid-spring-boot-starter 可正常登陆

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
		
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>

        <dependency>
            <groupId>org.minbox.framework</groupId>
            <artifactId>api-boot-starter-logging</artifactId>
        </dependency>

        <dependency>
            <groupId>org.minbox.framework</groupId>
            <artifactId>api-boot-starter-mybatis-enhance</artifactId>
        </dependency>

        <dependency>
            <groupId>org.minbox.framework</groupId>
            <artifactId>api-boot-starter-mybatis-pageable</artifactId>
        </dependency>

        <dependency>
            <groupId>org.minbox.framework</groupId>
            <artifactId>api-boot-starter-swagger</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

        <!-- 阿里数据库连接池 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>1.2.8</version>
        </dependency>
		
       <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
            <version>${mapstruct.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <version>${mapstruct.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>${javax.inject.version}</version>
        </dependency>

apiboot 从2.2.7.RELEASE升级到2.3.0RELEASE版本报错

报错内容如下:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.UnsupportedOperationException

Caused by: java.lang.UnsupportedOperationException: null

DataSource Switch 无法使用druid

apiboot版本: 2.3.0
只使用ApiBoot DataSource Switch
使用druid后发现数据源还是HikariCP

  boot:
    datasource:
      primary: lzj
      druid:

程序运行时显示
2020-08-05 10:54:04 [http-nio-80-exec-3] [INFO ] com.zaxxer.hikari.HikariDataSource -HikariPool-1 - Starting...

无法导入相应包

image
下面是我的maven配置,maven的依赖没保存,但是就是导入不了包。请指教!

@Cyberhan123 具体是什么问题?添加完版本依赖后,刷新项目了吗?

刷新了
image

Dependency org.apache.httpcomponents:httpclient, leading to CVE problem

Describe the bug
A clear and concise description of what the bug is.

Hi, In /api-boot-sample-integration/,there is a dependency **org.apache.httpcomponents:httpclient:4.5.1
** that calls the risk method.

CVE-2020-13956

The scope of this CVE affected version is [,4.5.13)

After further analysis, in this project, the main Api called is org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost

Risk method repair link : GitHub

CVE Bug Invocation Path--

Path Length : 6

org.minbox.framework.knowledge.library.common.tools.HttpClientTools: get(java.lang.String)Ljava.lang.String; .m2/repository/org/springframework/data/spring-data-keyvalue/2.7.2/spring-data-keyvalue-2.7.2.jar
org.minbox.framework.knowledge.library.common.tools.HttpClientTools: getResult(org.apache.http.client.methods.HttpRequestBase)Ljava.lang.String; .m2/repository/org/springframework/data/spring-data-keyvalue/2.7.2/spring-data-keyvalue-2.7.2.jar
org.apache.http.impl.client.CloseableHttpClient: execute(org.apache.http.client.methods.HttpUriRequest)Lorg.apache.http.client.methods.CloseableHttpResponse; .m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar
org.apache.http.impl.client.CloseableHttpClient: execute(org.apache.http.client.methods.HttpUriRequest,org.apache.http.protocol.HttpContext)Lorg.apache.http.client.methods.CloseableHttpResponse; .m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar
org.apache.http.impl.client.CloseableHttpClient: determineTarget(org.apache.http.client.methods.HttpUriRequest)Lorg.apache.http.HttpHost; .m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar
org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost;

Dependency tree--

[INFO] org.minbox.framework:api-boot-sample-integration:jar:2.3.9-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.7.3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.7.3:compile
[INFO] |  |  +- org.springframework.boot:spring-boot:jar:2.7.3:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.7.3:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.7.3:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.11:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.11:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.17.2:compile
[INFO] |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.17.2:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.36:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.30:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.7.3:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.13.3:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.13.3:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.13.3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.7.3:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.65:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.65:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.65:compile
[INFO] |  +- org.springframework:spring-web:jar:5.3.22:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.3.22:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.3.22:compile
[INFO] |     +- org.springframework:spring-aop:jar:5.3.22:compile
[INFO] |     +- org.springframework:spring-context:jar:5.3.22:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.3.22:compile
[INFO] +- org.minbox.framework:api-boot-starter-security-oauth-jwt:jar:2.3.9-SNAPSHOT:compile
[INFO] |  +- org.minbox.framework:api-boot-starter:jar:2.3.9-SNAPSHOT:compile
[INFO] |  |  +- org.minbox.framework:api-boot-autoconfigure:jar:2.3.9-SNAPSHOT:compile
[INFO] |  |  |  +- org.springframework.boot:spring-boot-configuration-processor:jar:2.7.3:compile
[INFO] |  |  |  \- org.minbox.framework:api-boot-tools:jar:2.3.9-SNAPSHOT:compile
[INFO] |  |  |     \- org.minbox.framework:minbox-core:jar:1.0.8:compile
[INFO] |  |  +- org.minbox.framework:api-boot-common:jar:2.3.9-SNAPSHOT:compile
[INFO] |  |  \- org.minbox.framework:api-boot:jar:2.3.9-SNAPSHOT:compile
[INFO] |  +- org.springframework.security.oauth:spring-security-oauth2:jar:2.5.0.RELEASE:compile
[INFO] |  |  +- org.springframework.security:spring-security-core:jar:5.7.3:compile
[INFO] |  |  |  \- org.springframework.security:spring-security-crypto:jar:5.7.3:compile
[INFO] |  |  +- org.springframework.security:spring-security-config:jar:5.7.3:compile
[INFO] |  |  \- org.springframework.security:spring-security-web:jar:5.7.3:compile
[INFO] |  +- org.springframework.security:spring-security-jwt:jar:1.1.0.RELEASE:compile
[INFO] |  |  \- org.bouncycastle:bcpkix-jdk15on:jar:1.64:compile
[INFO] |  |     \- org.bouncycastle:bcprov-jdk15on:jar:1.64:compile
[INFO] |  +- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |  |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  |  +- org.checkerframework:checker-qual:jar:3.12.0:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.11.0:compile
[INFO] |  |  \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.3:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.3:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.13.3:compile
[INFO] |  +- org.minbox.framework:minbox-oauth:jar:1.0.2:compile
[INFO] |  \- org.minbox.framework:minbox-security:jar:1.0.0.RELEASE:compile
[INFO] |     \- org.springframework.boot:spring-boot-starter-security:jar:2.7.3:compile
[INFO] +- org.minbox.framework:api-boot-starter-swagger:jar:2.3.9-SNAPSHOT:compile
[INFO] |  +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] |  |  \- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] |  |  +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] |  |  +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] |  |  +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] |  |  |  \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] |  |  +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] |  |  +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] |  |  +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] |  |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  |  \- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  +- io.springfox:springfox-bean-validators:jar:2.9.2:compile
[INFO] |  \- org.springframework.boot:spring-boot-starter-validation:jar:2.7.3:compile
[INFO] |     \- org.hibernate.validator:hibernate-validator:jar:6.2.4.Final:compile
[INFO] |        +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] |        \- org.jboss.logging:jboss-logging:jar:3.4.3.Final:compile
[INFO] +- org.minbox.framework:api-boot-starter-http-converter:jar:2.3.9-SNAPSHOT:compile
[INFO] |  +- com.alibaba:fastjson:jar:1.2.80:compile
[INFO] |  \- org.reflections:reflections:jar:0.9.11:compile
[INFO] |     \- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] +- org.minbox.framework:api-boot-starter-resource-load:jar:2.3.9-SNAPSHOT:compile
[INFO] |  +- org.minbox.framework:minbox-resource-load:jar:1.0.0.RELEASE:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-starter-data-redis:jar:2.7.3:compile
[INFO] |  |     +- org.springframework.data:spring-data-redis:jar:2.7.2:compile
[INFO] |  |     |  +- org.springframework.data:spring-data-keyvalue:jar:2.7.2:compile
[INFO] |  |     |  |  \- org.springframework.data:spring-data-commons:jar:2.7.2:compile
[INFO] |  |     |  +- org.springframework:spring-oxm:jar:5.3.22:compile
[INFO] |  |     |  \- org.springframework:spring-context-support:jar:5.3.22:compile
[INFO] |  |     \- io.lettuce:lettuce-core:jar:6.1.9.RELEASE:compile
[INFO] |  |        +- io.netty:netty-common:jar:4.1.79.Final:compile
[INFO] |  |        +- io.netty:netty-handler:jar:4.1.79.Final:compile
[INFO] |  |        |  +- io.netty:netty-resolver:jar:4.1.79.Final:compile
[INFO] |  |        |  +- io.netty:netty-buffer:jar:4.1.79.Final:compile
[INFO] |  |        |  +- io.netty:netty-transport-native-unix-common:jar:4.1.79.Final:compile
[INFO] |  |        |  \- io.netty:netty-codec:jar:4.1.79.Final:compile
[INFO] |  |        +- io.netty:netty-transport:jar:4.1.79.Final:compile
[INFO] |  |        \- io.projectreactor:reactor-core:jar:3.4.22:compile
[INFO] |  |           \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO] |  \- org.springframework.boot:spring-boot-starter-aop:jar:2.7.3:compile
[INFO] |     \- org.aspectj:aspectjweaver:jar:1.9.7:compile
[INFO] +- com.zaxxer:HikariCP:jar:4.0.3:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] +- org.minbox.framework:api-boot-starter-mybatis-enhance:jar:2.3.9-SNAPSHOT:compile
[INFO] |  +- com.gitee.hengboy:mybatis-enhance-core:jar:1.1.4:compile
[INFO] |  |  +- org.mybatis:mybatis:jar:3.5.6:compile
[INFO] |  |  +- org.mybatis:mybatis-spring:jar:2.0.6:compile
[INFO] |  |  \- org.springframework:spring-jdbc:jar:5.3.22:compile
[INFO] |  |     \- org.springframework:spring-tx:jar:5.3.22:compile
[INFO] |  \- com.gitee.hengboy:mybatis-enhance-dsl:jar:1.1.4:compile
[INFO] +- org.minbox.framework:api-boot-starter-mybatis-pageable:jar:2.3.9-SNAPSHOT:compile
[INFO] |  \- org.minbox.framework:mybatis-pageable:jar:1.0.8:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.30:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.24:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.7.3:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.7.3:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.7.3:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.7.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.4.8:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:2.4.8:test
[INFO] |  |        \- org.ow2.asm:asm:jar:9.1:test
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
[INFO] |  |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
[INFO] |  +- org.assertj:assertj-core:jar:3.22.0:test
[INFO] |  +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter:jar:5.8.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-api:jar:5.8.2:test
[INFO] |  |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] |  |  |  +- org.junit.platform:junit-platform-commons:jar:1.8.2:test
[INFO] |  |  |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-params:jar:5.8.2:test
[INFO] |  |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.8.2:test
[INFO] |  |     \- org.junit.platform:junit-platform-engine:jar:1.8.2:test
[INFO] |  +- org.mockito:mockito-core:jar:4.5.1:test
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.12.13:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.12.13:test
[INFO] |  |  \- org.objenesis:objenesis:jar:3.2:test
[INFO] |  +- org.mockito:mockito-junit-jupiter:jar:4.5.1:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.1:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-core:jar:5.3.22:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.3.22:compile
[INFO] |  +- org.springframework:spring-test:jar:5.3.22:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.9.0:test
[INFO] +- org.mapstruct:mapstruct:jar:1.3.0.Final:compile
[INFO] +- org.mapstruct:mapstruct-processor:jar:1.3.0.Final:provided
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] \- org.apache.httpcomponents:httpclient:jar:4.5.1:compile
[INFO]    +- org.apache.httpcomponents:httpcore:jar:4.4.15:compile
[INFO]    \- commons-codec:commons-codec:jar:1.15:compile

Suggested solutions:

Update dependency version

Thank you very much.

Mybatis Enhance 和 Mybatis Enhance Codegen 增加功能

1.Mybatis Enhance 增加BaseService ,直接把EnhanceMapper方法搬过来就行了,这样减少Service的基本CRUD代码编写。
2.Mybatis Enhance Codegen 增加默认生成Service和Mapper代码,可以不用写codegen.setting.json,有需要的话可以自定义odegen.setting.json。
PS:BaseService可以参考 Mybatis plus

2.1.3.RELEASE jar下载不了

在pom里配置了2.1.3.RELEASE 却下载不了。
2.1.2可下载

org.springframework.cloud spring-cloud-dependencies Finchley.M9 pom import org.minbox.framework api-boot-dependencies 2.1.3.RELEASE import pom

自定义Oauth2认证失败响应格式

默认情况下OAuth2认证失败后响应格式示例:

{
  "error": "invalid_grant",
  "error_description": "User is disabled"
}

那么我们怎么根据自己业务系统来自定义任务失败响应格式内容呢?

项目结构疑问

最近自己也想写starter,看到这个项目。
项目是不是把某个工具如ratelimit分成了starter、autoconfigure、plugin这三个模块?
aotu为啥各个工具的要聚合在一起?不在各自的实现中?
另外吐槽下,其中几个parent模块关系看的头大。。。

对于限流问题

我看到项目有限流功能,觉得这个项目很有用处。不过我有以下几个问题
1.限流是限制所有的IP嘛(就是一个接口做了限流然后这个接口就只能1秒访问20次);如果出现大并发情况又想限流怎么办?
2.可不可以指定限流的IP或者IP段,这样可以避免某些程序自动循环调用接口。

文档补全

1.Mybatis Enhance DSL没有链表查询示例和 api.boot.enhance.*配置说明。
2.MyBatis-Pageable 没说明DSL查询也可以分页 和DSL分页查询的示例
3.Mybatis Enhance Codegen 没有codegen.setting.json配置示例和说明

请求指导, api-boot-starter-mybatis-enhance启动报错,执行重载SqlSource失败

使用
api-boot-starter-mybatis-enhance启动报错

Error creating bean with name 'custTranInfoMapper' defined in file [D:\api-boot-cbrc\cbrc-statement-verify-services\target\classes\org\minbox\framework\api\boot\cbrc\stateverify\mapper\CustTranInfoMapper.class]: Invocation of init method failed; nested exception is com.gitee.hengboy.mybatis.enhance.exception.EnhanceFrameworkException: MappedStatement:[org.minbox.framework.api.boot.cbrc.stateverify.mapper.CustTranInfoMapper.insertArray],执行重载SqlSource失败.

是哪里写法有有误吗?求指导

package org.minbox.framework.api.boot.cbrc.stateverify.mapper;

import com.gitee.hengboy.mybatis.enhance.mapper.EnhanceMapper;
import org.minbox.framework.api.boot.cbrc.stateverify.entity.MisTraninfoSv;

public interface CustTranInfoMapper extends EnhanceMapper<MisTraninfoSv> {


}
package org.minbox.framework.api.boot.cbrc.stateverify.service;

import cn.hutool.core.util.StrUtil;
import com.gitee.hengboy.mybatis.enhance.dsl.serach.Searchable;
import com.gitee.hengboy.mybatis.enhance.sort.SortEnum;
import lombok.extern.slf4j.Slf4j;
import org.minbox.framework.api.boot.cbrc.stateverify.entity.CbrcRequest;
import org.minbox.framework.api.boot.cbrc.stateverify.entity.MisTraninfoSv;
import org.minbox.framework.api.boot.cbrc.stateverify.entity.dsl.DMisTraninfoSv;
import org.minbox.framework.api.boot.cbrc.stateverify.mapper.CustTranInfoMapper;
import org.minbox.framework.api.boot.cbrc.stateverify.service.base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.List;


@Slf4j
@Service
public class CustTranInfoService extends BaseService<MisTraninfoSv, String> {


    @Autowired
    private CustTranInfoMapper custTranInfoMapper;

    public List<MisTraninfoSv> findTranInfoByParams(CbrcRequest request) {

        DMisTraninfoSv dMisTraninfoSv = DMisTraninfoSv.DSL();

        Searchable searchable =
            dslFactory.createSearchable().selectFrom(dMisTraninfoSv).orderBy(dMisTraninfoSv.recNo, SortEnum.DESC)
                .orderBy(dMisTraninfoSv.tranDate, SortEnum.ASC).orderBy(dMisTraninfoSv.tranTime, SortEnum.ASC);

        if (!ObjectUtils.isEmpty(request.getDetailType())) {

   
            if (StrUtil.equals("2", request.getDetailType())) {
                searchable.and(dMisTraninfoSv.crDrInd.eq("D"));
            }
      
            if (StrUtil.equals("1", request.getDetailType())) {
                searchable.and(dMisTraninfoSv.crDrInd.eq("C"));
            }
        }

        searchable.and(dMisTraninfoSv.cardNo.eq(request.getUserAccount()));
        searchable.and(dMisTraninfoSv.tranDate.gte(StrUtil.replace(request.getDetailStartDate(), "-", "")));
        searchable.and(dMisTraninfoSv.tranDate.lte(StrUtil.replace(request.getDetailEndDate(), "-", "")));

        return searchable.resultType(MisTraninfoSv.class).fetch();
    }

}

Mongo is not integrated, an exception occurs when the project starts

Caused by: java.lang.ClassNotFoundException: org.minbox.framework.mongo.client.setting.SslSettings
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
	... 25 common frames omitted

已经在ignoring-urls 添加了不需要授权的链接,但访问时候还是提示未授权错误

api:
  boot:
    # ApiBoot Security相关配置
    security:
      away: jdbc
      enable-default-store-delegate: false
      # 拦截服务内的全部接口请求地址
      auth-prefix: /**
      # 排除不拦截的路径
      ignoring-urls:
        - /test/**

在org.minbox.framework.api.boot.autoconfigure.security.ApiBootWebSecurityAutoConfiguration#configureIgnoreUrls 中能看到ignoringUrls变量也有了配置的自定义忽略链接,但访问 /test 还是被拦截,返回错误

{
    "errorCode": "Unauthorized",
    "errorMessage": "Full authentication is required to access this resource"
}

启动报循环依赖错误

启动会报循环依赖错误

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

   documentationPluginsBootstrapper defined in URL [jar:file:/D:/tools/java/maven/repo/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]
      ↓
   webMvcRequestHandlerProvider defined in URL [jar:file:/D:/tools/java/maven/repo/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]
      ↓
   org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration (field private java.util.List org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration.configurers)
┌─────┐
|  org.minbox.framework.api.boot.autoconfigure.oauth.ApiBootAuthorizationMemoryServerAutoConfiguration (field private org.springframework.security.oauth2.provider.token.TokenStore org.minbox.framework.oauth.AuthorizationServerConfiguration.tokenStore)
└─────┘


I can't run the demo of ApiBootSecurityOauth

Caused by: java.lang.NoClassDefFoundError: org/reflections/util/ConfigurationBuilder
at org.minbox.framework.api.boot.common.tools.ClassTools.initReflections(ClassTools.java:47) ~[classes/:na]
at org.minbox.framework.api.boot.common.tools.ClassTools.getSubClassList(ClassTools.java:61) ~[classes/:na]

Quartz执行updateJobCron出错

api-boot-starter-quartz
版本:2.1.4.RELEASE
Quartz执行updateJobCron出错,提示
(ApiBootQuartzServiceDefaultSupport.java:225)
org.quartz.impl.triggers.SimpleTriggerImpl cannot be cast to org.quartz.CronTrigger

English translations for the repository documentation and README

Is your feature request related to a problem? Please describe.
Suggestion for English Translations

Describe the solution you'd like
Where can I find the english translations for reading the documents ?

Additional context
I believe adding English translation would make more people to adopt these practices, is it possible to make it avaialble in english, thank you.

oss-parent 依赖从哪里来哈

Project build error: Non-resolvable parent POM for org.minbox.framework:api-boot:0.1.1.RELEASE: Failure to find org.minbox.framework:oss-parent:pom:0.1.0.RELEASE in http://
maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are
forced and 'parent.relativePath' points at wrong local POM

MyBatis主键自增Long类型反射异常

SelectAutoKeyGenerator

ResultMap.Builder builder = new ResultMap.Builder(statement.getConfiguration(), statement.getId() + "-Inline", **Integer.class**, new ArrayList(), true);

虽然能够成功插入
但是日志报错

org.apache.ibatis.reflection.ReflectionException: Could not set property 'id' of 'class ltd.beihu.black.orgmanager.model.ProdOption' with value '6' Cause: java.lang.IllegalArgumentException: argument type mismatch at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:185) at org.apache.ibatis.reflection.wrapper.BeanWrapper.set(BeanWrapper.java:59) at org.apache.ibatis.reflection.MetaObject.setValue(MetaObject.java:140) at com.gitee.hengboy.mybatis.enhance.key.generator.SelectAutoKeyGenerator.setValue(SelectAutoKeyGenerator.java:89) at com.gitee.hengboy.mybatis.enhance.key.generator.SelectAutoKeyGenerator.batchProcessAfter(SelectAutoKeyGenerator.java:76) at com.gitee.hengboy.mybatis.enhance.key.generator.SelectAutoKeyGenerator.processAfter(SelectAutoKeyGenerator.java:52)

logging的ignorePaths可以支持正则表达式

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
api排除拦截现在都要写完成路径才行 类似的 /index /index/112 如果我要排除 /index开头的所有的api不好写 可以考虑做类似下面的操作
ignore-paths: - /index/*

Describe the solution you'd like
A clear and concise description of what you want to happen.
使用正则匹配应该是比较不错的

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
在filter或拦截器里做类似的:

public class ParamFilter implements Filter {

    private PrintParamProperties properties;

    public ParamFilter(PrintParamProperties properties) {
        this.properties = properties;
    }
    @Override
    public void doFilter(ServletRequest request, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        if (properties == null) {
            properties = new PrintParamProperties();
        }
        HttpServletRequest r = (HttpServletRequest) request;

        if (isRequestExcluded(r)) {
            filterChain.doFilter(request, servletResponse);
}
 private boolean isRequestExcluded(HttpServletRequest httpRequest) {
        return Objects.nonNull(this.properties.getFilterExcludePattern())
                && Pattern.compile(this.properties.getFilterExcludePattern())
                .matcher(httpRequest.getRequestURI().substring(httpRequest.getContextPath().length()))
                .matches();
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.