A facile mechanochemical preparation of Co3O4@g-C3N4 for application in supercapacitors and degradation of pollutants in water.