All Downloads are FREE. Search and download functionalities are using the official Maven repository.

angry1980.audio.config.CommonConfig Maven / Gradle / Ivy

There is a newer version: 0.0.10
Show newest version
package angry1980.audio.config;

import angry1980.audio.dao.TrackDAO;
import angry1980.audio.dao.TrackSimilarityDAO;
import angry1980.audio.service.TrackSimilarityService;
import angry1980.audio.service.TrackSimilarityServiceImpl;
import angry1980.audio.similarity.ComplexFindSimilarTracks;
import angry1980.audio.similarity.FindSimilarTracks;
import angry1980.audio.similarity.TracksToCalculate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class CommonConfig {

    @Autowired
    private List findSimilarTracksList;
    @Autowired
    private TrackDAO trackDAO;
    @Autowired
    private TrackSimilarityDAO trackSimilarityDAO;
    @Autowired
    private TracksToCalculate tracksToCalculate;

    @Bean
    public TrackSimilarityService trackSimilarityService(){
        return new TrackSimilarityServiceImpl(
                trackDAO,
                trackSimilarityDAO,
                new ComplexFindSimilarTracks(findSimilarTracksList),
                tracksToCalculate
        );
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy