added how to use JavaConfig