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

Micronaut controllers produce and consume JSON by default no need to specify it #2408

Closed
sdelamo opened this issue May 21, 2024 · 0 comments · Fixed by #2413
Closed

Micronaut controllers produce and consume JSON by default no need to specify it #2408

sdelamo opened this issue May 21, 2024 · 0 comments · Fixed by #2413
Assignees

Comments

@sdelamo
Copy link
Collaborator

sdelamo commented May 21, 2024

Such controller:

@Controller("/services/today")
@ExecuteOn(TaskExecutors.BLOCKING)
@Secured(SecurityRule.IS_AUTHENTICATED)
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Tag(name = "Today")
public class TodayController {

can be rewritten as:

@Controller("/services/today")
@ExecuteOn(TaskExecutors.BLOCKING)
@Secured(SecurityRule.IS_AUTHENTICATED)
@Tag(name = "Today")
public class TodayController {
@sdelamo sdelamo self-assigned this May 21, 2024
@sdelamo sdelamo changed the title Micronaut controllers produce and consume JSON By default no need to specify it Micronaut controllers produce and consume JSON by default no need to specify it May 21, 2024
@sdelamo sdelamo linked a pull request May 21, 2024 that will close this issue
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 a pull request may close this issue.

1 participant