Ошибка запуска ApplicationContext в Apache Tomcat - PullRequest
0 голосов
/ 01 октября 2018

Когда я запускаю Apache Tomcat, я получаю сообщение об ошибке ниже:

@ComponentScan(basePackages =     
{"com.ce.resources","com.ce.services","com.ce.repository) 
@EnableJpaRepositories("com.ce.repository")
@EntityScan(basePackages ={"com.ce.entity","com.ce.tp"})
@SpringBootApplication

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-10-01 15:21:38.861 ERROR 15528 --- [ost-startStop-1] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 1 of constructor in com.ce.services.UserProfileService required a bean of type 'com.ce.tp.UserProfileMapper' that could not be found.

Action:

Consider defining a bean of type 'com.ce.tp.UserProfileMapper' in your configuration.

Приложение не запускается, и есть проблема с параметром 1 конструктора.Это аннотация, которую я использую: @Mapper(componentModel = "spring", uses = {}).Я могу предоставить полную трассировку стека, если это необходимо.

package com.ce.entity;

import org.mapstruct.Mapper;

import com.ce.dto.UserProfileDTO;
import com.ce.entity.EntityMapper;
import com.ce.entity.UserProfile;

/**
 * Mapper for the entity UserProfile and its DTO UserProfileDTO.
 */
@Mapper(componentModel = "spring", uses = {})
public interface UserProfileMapper extends EntityMapper<UserProfileDTO, UserProfile> {

    default UserProfile fromId(Long id) {
        if(id==null) {
            return null;
        }else {
            UserProfile userprofile=new UserProfile();
            userprofile.setId(id);
            return userprofile;
        }
    }


}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...