Skip to content

Instantly share code, notes, and snippets.

View andy221166's full-sized avatar
🎯
Focusing

Andy Nguyen andy221166

🎯
Focusing
View GitHub Profile
/**
* This configuration helps support for load javax/hibernate validator message by custom key
*
* @return
*/
@Bean
public Validator validator() {
final LocalValidatorFactoryBean factory = new LocalValidatorFactoryBean();
factory.setValidationMessageSource(messageSource());
return factory;
@andy221166
andy221166 / config.go
Created March 12, 2020 09:08
Golang read YAML file
package config
import "os"
import "log"
import "gopkg.in/yaml.v3"
const CONFIG_PATH = "/path/to/config.yml"
type Config struct {
Conn struct {