Git Product home page Git Product logo

core-ng-project's People

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  avatar  avatar  avatar  avatar

core-ng-project's Issues

[Support Request] XHR request may read cache by browser which conflict the purpose of ajax request

The scenario is that:
The project is a react project. Page A has a list and an edit button.

  1. click the edit button to page B.
  2. edit the list and click save.
  3. the browser makes a put request to update the list and wait for it to finish.
  4. Then the browser goes back to Page A automatically.
  5. Page A makes a get request to get the list. And that request is read from the cache, so the list displayed as NOT updated.

This issue is likely that could be resolved by the frontend eventually. My question is that should backend response allow the browser to cache ajax requests in the first place?

Provide Relative Path on REST Request

Currently, from the perspective of any HTTP interceptor in core-ng, there is no way to get access to the relative path without the path parameters. There are currently two properties on the Request interface in core-ng related to paths:

The path parameter is currently the original path without decoding for instance api/object/767e963b-f6f8-4d26-b49f-1636d95db854/details instead of api/object/:id/details. There also doesn't appear to be a good way to get to the decode version of this path from the perspective of the Request since that is only accessible through the Path class which is only accessible at the registering of the service:

Websocket Middleware

Currently, in core-ng there is an interceptor pattern that allows clients to inject middleware into the request flow for both Pre-Request handling as well as Post-Request handling. This same functionality is not currently available for websockets where we may want to use this middleware in a similar way as we do the REST requests.

The proposal would be to introduce a new Interceptor interface:

public interface WebsocketChannelInterceptor<T, V> {
    void onMessage(Channel<V> channel, T message);
}

This middleware would be invoked before message handling after the channel had been established.

wiki

can you improve the core-ng wiki?

buffer.clear() method not found when running on Java 8

Here is my stack trace:

Using Java 1.8.0_152-release

2017-12-20T08:15:50.336Z [XNIO-1 task-2] DEBUG c.f.i.log.ActionLog - [context] method=POST
2017-12-20T08:15:50.336Z [XNIO-1 task-2] ERROR c.f.i.log.LogManager - [java.lang.NoSuchMethodError] java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at core.framework.impl.web.request.RequestBodyReader.read(RequestBodyReader.java:47)
at core.framework.impl.web.HTTPServerIOHandler.handleRequest(HTTPServerIOHandler.java:38)

at io.undertow.server.protocol.http2.Http2UpgradeHandler.handleRequest(Http2UpgradeHandler.java:129)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:332)
at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:561)

can't register same name interface

code like :
api().client(BOChefWebService.class, requiredProperty("app.product.serviceURL"));
...
api().client(app.truck.api.BOChefWebService.class, requiredProperty("app.truck.serviceURL"));

same interface name, diff package name, but BeanClassNameValidator.validate only validate last class name(BOChefWebService)... 😢

can support command line Arguments?

like spring boot sport , java -jar spring-5.jar --server.port=8083

can add like [sys.https.port] into vm option, and replace exist [context.propertyManager.properties] key. we often use different port on each project. i think it will quick development.

Could we have inteceptor work on response before validateResponse?

core-ng version: 7.1.6
file: core-ng/src/main/java/core/framework/internal/web/service/WebServiceClient.java
lines: 77-81
Scenario: API test using core-ng, I wish I could process response includes error message even when it's failed. Do you think we could process "onResponse" before validate response? If not, could we add an "onResponseBeforeValidate"? But the way I'm a big fan of yours:)

为何不用注解扫描向BeanFactory里面放bean,

看到大部分是通过core.framework.impl.inject.BeanFactory#bind的方法向BeanFactory的beans属性放bean,为何不直接在要注册bean的类上面标一个注解,通过注解扫描的方式向BeanFactory里面放Bean呢,通过bind的方式注册Bean,不会觉得代码侵入性很大吗

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.