Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.3 modified api #1004

Merged

Conversation

yimaixinchen
Copy link
Contributor

@yimaixinchen yimaixinchen commented Sep 16, 2021

What is the purpose of the change

it can transform jersey to spring mvc api

Brief change log

remove jersey api
add spring mvc api

imcomplete part

but i can not transform requestbody in jersey to spring mvc .
just like FormDataMultiPart multiPartForm in RequestBody

return Message.ok().data("update_id", envId);
}

@RequestMapping(value = "/env/{env_id}/form",method = RequestMethod.PUT,headers = MediaType.MULTIPART_FORM_DATA)
Copy link
Contributor

@casionone casionone Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heders or consumes?
javas.ws.rs.core.MediaType can be replaced by org.springframework.http.MediaType

@POST
@Path("/env/json")
public Response insertJsonEnv(DataSourceEnv dataSourceEnv, @Context HttpServletRequest req){
return RestfulApiHelper.doAndResponse(()->{
Copy link
Contributor

@casionone casionone Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About RestfulApiHelper.doAndResponse
may be modify RestfulApiHelper.doAndResponse return object of Response to Message will be better

@casionone
Copy link
Contributor

What is the purpose of the change

[module of linkis-datasource] Replace jersey's restful style with spring web
Related issues: #993.

Copy link
Contributor

@peacewong peacewong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@peacewong peacewong merged commit 98554ee into apache:dev-1.0.3 Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants