We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Didn't work like this way
public class StartupListener implements ServerConfigStartup { @Override public void onStart(ServerConfig serverConfig) { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setDateFormat(new SimpleDateFormat("yyyy年MM月dd日 HH点mm分ss秒")); serverConfig.setObjectMapper(objectMapper); //serverConfig.setJsonDateTime(JsonConfig.DateTime.ISO8601); } }
@Configuration @ComponentScan @EnableAutoConfiguration public class Application { private static final Logger LOGGER = LoggerFactory.getLogger(Application.class); static { if (!AgentLoader.loadAgentFromClasspath( "avaje-ebeanorm-agent", "debug=1;packages=com.millinch.ebean.demo.domain")) { LOGGER.info("avaje-ebeanorm-agent not found in classpath - not dynamically loaded"); } } public static void main(String[] args) { SpringApplication.run(Application.class, args); } @Bean public ObjectMapper objectMapper(){ ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setDateFormat(new SimpleDateFormat("yyyy年MM月dd日 HH点mm分ss秒")); objectMapper.registerModule(new JacksonEbeanModule()); return objectMapper; } @Bean public MappingJackson2JsonView mappingJackson2JsonView() { MappingJackson2JsonView jsonView = new MappingJackson2JsonView(); jsonView.setObjectMapper(objectMapper()); return jsonView; } @Bean public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(){ MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); converter.setObjectMapper(objectMapper()); return converter; } }
@RestController public class UserApi { @RequestMapping(value = "/user") public List<User> getUsers() { return User.find.findList(); } }
The text was updated successfully, but these errors were encountered:
Ok, I have dropped the ball on this one. Should get to it shortly.
Sorry, something went wrong.
No branches or pull requests
Didn't work like this way
The text was updated successfully, but these errors were encountered: