IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Spring Boot Java Discussion :

comment résoudre There was an unexpected error (type=Not Found, status=404).


Sujet :

Spring Boot Java

  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    728
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 728
    Points : 250
    Points
    250
    Par défaut comment résoudre There was an unexpected error (type=Not Found, status=404).
    Bonjour, je lance une application spring boot avec ce controller

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
        @RestController
        @RequestMapping({"/api"})
        public class ProduitImmobilierController {
     
        	Logger logger = LoggerFactory.getLogger(ProduitImmobilierController.class);
     
            @Autowired
            private ProduitImmobilierService produitImmobilierService;
     
            @RequestMapping(value = "/produitimmobilier/all/{pageSize}/{page}",
            method = RequestMethod.GET,
            produces = {"text/plain;charset=UTF-8", MediaType.APPLICATION_JSON_VALUE})
            public @ResponseBody List<ProduitImmobilierDTO> findAll(@PathVariable("pageSize") int pageSize, @PathVariable("page") int page){
            	logger.info("CONTROLLER PRODUITIMMOBILIERSERVICE CA PASSE");
            	return produitImmobilierService.findAll(pageSize, page);
            }

    Je vérifie que l'application écoute sur le port 8080
    J'essaye d'accéder au controleur avec cette url sur firefox

    http://localhost:8080/api/produitimmobilier/all/5/1
    Et j'ai cette erreur

    Whitelabel Error Page

    This application has no explicit mapping for /error, so you are seeing this as a fallback.
    Wed Nov 13 20:48:53 CET 2019
    There was an unexpected error (type=Not Found, status=404).
    No message available
    Voici l'arborescence du projet :

    Nom : Capture d’écran 2019-11-13 à 21.12.07.png
Affichages : 7210
Taille : 33,1 Ko

    Quand je vais à l'adresse url : http://localhost:8080/api/produitimmobilier/all/5/1, j'obtiens les logs suivants

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    2019-11-14 12:20:58.770  INFO 2998 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
    2019-11-14 12:20:58.770  INFO 2998 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
    2019-11-14 12:20:58.787  INFO 2998 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 17 ms
    Pouvez-vous m'aider
    Images attachées Images attachées  

  2. #2
    Membre confirmé Avatar de Kazh Du
    Homme Profil pro
    Développeur Java
    Inscrit en
    Novembre 2011
    Messages
    152
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2011
    Messages : 152
    Points : 561
    Points
    561
    Par défaut


    As-tu bien configuré Spring boot ?
    Peux-tu nous montrer le code de ta classe principale ? (celle qui contient ton main)
    Merci d'ajouter un sur les tags qui vous ont aidé

  3. #3
    Membre actif
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    728
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 728
    Points : 250
    Points
    250
    Par défaut
    Bonjour

    voici mon code de la méthode principale


    package com.example.demoImmobilierBack;
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.context.annotation.ComponentScan;
     
    @SpringBootApplication
    @ComponentScan({"com.example.demoImmobilierBack.service"})
    public class DemoImmobilierBackApplication {
     
    	public static void main(String[] args) {
    		SpringApplication.run(DemoImmobilierBackApplication.class, args);
    	}
     
    }

  4. #4
    Membre confirmé Avatar de Kazh Du
    Homme Profil pro
    Développeur Java
    Inscrit en
    Novembre 2011
    Messages
    152
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2011
    Messages : 152
    Points : 561
    Points
    561
    Par défaut
    Le package de tes contrôleurs n'est pas scanné, il faut le rajouter dans le ComponentScan. D'ailleurs, tu auras le même problème pour tes repositories.
    Le mieux serait donc de mettre ton projet entier dans le ComponentScan :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    @ComponentScan({"com.example.demoImmobilierBack"})
    Merci d'ajouter un sur les tags qui vous ont aidé

  5. #5
    Membre actif
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    728
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 728
    Points : 250
    Points
    250
    Par défaut
    Bonjour, j'ai avancé et j'ai changé la classe contenant la méthode main, en ajoutant @ComponentScan comme suit :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
        package com.example.demoImmobilierBack;
     
        import org.springframework.boot.SpringApplication;
        import org.springframework.boot.autoconfigure.SpringBootApplication;
        import org.springframework.context.annotation.ComponentScan;
     
        @SpringBootApplication
        @ComponentScan({"com.example.demoImmobilierBack.service","com.example.demoImmobilierBack", "com.example.demoImmobilierBack.controller", "com.example.demoImmobilierBack.repository"})
        public class DemoImmobilierBackApplication {
     
        	public static void main(String[] args) {
        		SpringApplication.run(DemoImmobilierBackApplication.class, args);
        	}
        }
    Et quand je vais à l'adresse

    http://localhost:8080/api/produitimmobilier/all/5/1
    je reçois l'erreur suivante:

    Whitelabel Error Page

    This application has no explicit mapping for /error, so you are seeing this as a fallback.
    Thu Nov 14 21:11:26 CET 2019
    There was an unexpected error (type=Not Acceptable, status=406).
    Could not find acceptable representation
    J'ai lu ceci sur l'erreur 406

    The 406 Not Acceptable is an HTTP response status code indicating that the client has requested a response using Accept- headers that the server is unable to fulfill. This is typically a result of the user agent (i.e. browser) specifying an acceptable character set (via Accept-Charset), language (via Accept-Language), and so forth that should be responded with, and the server being unable to provide such a response.
    Je travaille sur Firefox et j'ai essayé de changer le user agent avec User-Agent Switcher, pour avoir une réponse propre, c'est à dire une réponse json, mais sans succès

    J'ai eu un autre problème. Quand j'essaye d'ajouter un autre controlleur et un service dans mon application, c'est à dire ce qui suit:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
        package com.example.demoImmobilierBack.controller;
     
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.http.MediaType;
        import org.springframework.web.bind.annotation.RequestBody;
        import org.springframework.web.bind.annotation.RequestMapping;
        import org.springframework.web.bind.annotation.RequestMethod;
        import org.springframework.web.bind.annotation.ResponseBody;
        import org.springframework.web.bind.annotation.RestController;
     
        import com.example.demoImmobilierBack.dto.UserDTO;
        import com.example.demoImmobilierBack.dto.UserDTOWithMesssage;
        import com.example.demoImmobilierBack.service.UserService;
     
        @RestController
        @RequestMapping({"/api/user"})
        public class UserController {
     
            @Autowired
            private UserService userService;
     
            @RequestMapping(value = "/login",
            method = RequestMethod.POST,
            produces = {"text/plain;charset=UTF-8", MediaType.APPLICATION_JSON_VALUE},
            consumes = {"text/plain;charset=UTF-8", MediaType.APPLICATION_JSON_VALUE})
            public @ResponseBody UserDTOWithMesssage login(@RequestBody UserDTO userDTO){
            	UserDTOWithMesssage userDTOWithMesssage = new UserDTOWithMesssage();
            	String message = userService.checkIfUserExistsAndGoodCredential(userDTO);
            	if (message.isEmpty()) {
            		userDTO = userService.findByEmailAndPassword(userDTO.getEmail(), userDTO.getPassword());
            		userDTO.setPassword("");
            	} else {
            		userDTOWithMesssage.setMessage(message);
            	}
                return userDTOWithMesssage;
            }
     
            @RequestMapping(value = "/save",
            method = RequestMethod.POST,
            produces = {"text/plain;charset=UTF-8", MediaType.APPLICATION_JSON_VALUE},
            consumes = {"text/plain;charset=UTF-8", MediaType.APPLICATION_JSON_VALUE})
            public @ResponseBody UserDTOWithMesssage save(@RequestBody UserDTO userDTO){
            	UserDTOWithMesssage userDTOWithMesssage = new UserDTOWithMesssage();
            	String message = userService.checkEmailAndPasswordAndPasswordConfirm(userDTO);
            	if (message.isEmpty()) {
            		UserDTO userDTOSaved = userService.save(userDTO);
            		userDTOWithMesssage.setUserDTO(userDTOSaved);
            		userDTOWithMesssage.setMessage(message);
            	} else {
            		userDTOWithMesssage.setUserDTO(userDTO);
            		userDTOWithMesssage.setMessage("");    		
            	}
            	return userDTOWithMesssage;
            }
        }
    Quand je démarre l'application, j'obtiens l'erreur suivante, comme si UserService n'a pas pu être scanné

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

    Description:

    Field userService in com.example.demoImmobilierBack.controller.UserController required a bean of type 'com.example.demoImmobilierBack.service.UserService' that could not be found.

    The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)


    Action:

    Consider defining a bean of type 'com.example.demoImmobilierBack.service.UserService' in your configuration.
    Voici l'arbre hiérarchique de mon projet

    Nom : Capture d’écran 2019-11-14 à 21.27.38.png
Affichages : 7173
Taille : 45,3 Ko

  6. #6
    Membre confirmé Avatar de Kazh Du
    Homme Profil pro
    Développeur Java
    Inscrit en
    Novembre 2011
    Messages
    152
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2011
    Messages : 152
    Points : 561
    Points
    561
    Par défaut
    Pour ton erreur 406, je ne suis pas sur, je ne l'ai jamais rencontrée. Peut être devrais-tu essayer de retirer le "text/plain;charset=UTF-8" du produce (et du consume éventuellement).
    Ça ne devrait pas venir d'un problème de compatibilité avec Firefox (à moins que tu ne le sorte d'un musée, vérifie tout de même ta version). Je te conseille d'utiliser un outil dédié à l'appel de webservices comme Postman pour effectuer tes tests.

    Pour le problème du Autowired, il faudrait que tu nous donnes les sources de ton Service (interface et implémentation).
    Pour moi le service ne doit pas être marqué comme étant un Bean (@Service sur l'implémentation) ou bien il s'agit d'un problème en cascade (un autowired du service qui n'est pas satisfait) mais tu ne nous a pas donné la stacktrace complète donc difficile à savoir.
    Merci d'ajouter un sur les tags qui vous ont aidé

  7. #7
    Membre actif
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    728
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 728
    Points : 250
    Points
    250
    Par défaut
    Bonjour Kazh Du,

    effectivement quand j'enlève

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
       @RequestMapping(value = "/produitimmobilier/all/{pageSize}/{page}",
        method = RequestMethod.GET
    //    ,produces = {"text/plain;charset=UTF-8", MediaType.APPLICATION_JSON_VALUE}
        )
        @ResponseBody
        public List<ProduitImmobilierDTO> findAll(@PathVariable("pageSize") int pageSize, @PathVariable("page") int page){
        	logger.info("CONTROLLER PRODUITIMMOBILIERSERVICE CA PASSE");
        	return produitImmobilierService.findAll(pageSize, page);
        }
    Ca marche, j'obtiens une réponse json.

    Pour ce qui est du problème de Userservice, le voici:

    interface
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
     
    package com.example.demoImmobilierBack.service;
     
    import com.example.demoImmobilierBack.dto.UserDTO;
    import com.example.demoImmobilierBack.model.User;
     
    public interface UserService {
     
    	UserDTO findByEmailAndPassword(String email, String password);
     
    	UserDTO save(UserDTO userDTO);
     
    	String checkIfUserExistsAndGoodCredential(UserDTO userDTO);
     
    	UserDTO convertUserToUserDTO(User user);
     
    	User convertUserDTOToUser(UserDTO userDTO);
     
    	String checkEmailAndPasswordAndPasswordConfirm(UserDTO userDTO);
     
    }
    implémentation
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
     
    package com.example.demoImmobilierBack.service;
     
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Date;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
     
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.data.repository.query.Param;
     
    import com.example.demoImmobilierBack.dto.ProduitImmobilierDTO;
    import com.example.demoImmobilierBack.dto.UserDTO;
    import com.example.demoImmobilierBack.model.ProduitImmobilier;
    import com.example.demoImmobilierBack.model.User;
    import com.example.demoImmobilierBack.repository.ProduitImmobilierRepository;
    import com.example.demoImmobilierBack.repository.UserRepository;
     
    public class UserServiceImpl implements UserService{
     
    	public static final Pattern VALID_EMAIL_ADDRESS_REGEX = 
    		    Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
     
    	public static final Pattern VALID_PASSWORD_REGEX = 
    		    Pattern.compile("(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[$@$!%*?&])[A-Za-z\\d$@$!%*?&].{8,}");
     
        @Autowired
        private UserRepository userRepository;
     
        @Autowired
        private ProduitImmobilierService produitImmobilierService;
     
    	public UserDTO findByEmailAndPassword(String email, String password) {
    		User user = userRepository.findByEmailAndPassword(email, password);
    		return convertUserToUserDTO(user);
    	}
     
    	public UserDTO save(UserDTO userDTO) {
    		User user = userRepository.save(convertUserDTOToUser(userDTO));
    		return convertUserToUserDTO(user);
    	}
     
    	public String checkEmailAndPasswordAndPasswordConfirm(UserDTO userDTO) {
    		Matcher matcher = VALID_EMAIL_ADDRESS_REGEX .matcher(userDTO.getEmail());
    		if (!matcher.find()) {
    			return "L'email que vous avez fourni: " + userDTO.getEmail() + " n'est pas valide";
    		}
    		User user = userRepository.findByEmail(userDTO.getEmail());
    		if (user != null) {
    			return "L'utilisateur avec l'email suivant " + userDTO.getEmail() + " existe déjà";
    		}
    		matcher = VALID_PASSWORD_REGEX .matcher(userDTO.getPassword());
    		if (!matcher.find()) {
    			return "Le mot de passe que vous avez fourni: " + userDTO.getPassword() + " n'est pas valide. Il doit contenir au moins 8 caractères, un caractère minuscule, un caractère majuscule, un chiffre et un caractère spécial.";
    		}
    		if (!userDTO.getPassword().equals(userDTO.getPasswordConfirm())) {
    			return "Le mot de passe que vous avez fourni: " + userDTO.getPassword() + " ne correspond pas à la confirmation du mot de passe  " + userDTO.getPasswordConfirm();
    		}
    		return "";
    	}
     
    	public String checkIfUserExistsAndGoodCredential(UserDTO userDTO) {
    		Matcher matcher = VALID_EMAIL_ADDRESS_REGEX .matcher(userDTO.getEmail());
    		if (!matcher.find()) {
    			return "L'email que vous avez fourni: " + userDTO.getEmail() + " n'est pas valide";
    		}
    		User user = userRepository.findByEmail(userDTO.getEmail());
    		if (user == null) {
    			return "L'utilisateur avec l'email suivant " + userDTO.getEmail() + " n'existe pas";
    		}
    		matcher = VALID_PASSWORD_REGEX .matcher(userDTO.getPassword());
    		if (!matcher.find()) {
    			return "Le mot de passe que vous avez fourni: " + userDTO.getPassword() + " n'est pas valide. Il doit contenir au moins 8 caractères, un caractère minuscule, un caractère majuscule, un chiffre et un caractère spécial.";
    		}
    		user = userRepository.findByEmailAndPassword(userDTO.getEmail(), userDTO.getPassword());
    		if (user == null) {
    			return "L'utilisateur avec l'email suivant " + userDTO.getEmail() + " et le mot de passe suivant " + userDTO.getPassword() + "n'existe pas";
    		}	
    		return "";
    	}
     
    	public UserDTO convertUserToUserDTO(User user) {
    		UserDTO userDTO = new UserDTO();
    		userDTO.setId(user.getId());
    		userDTO.setGender(user.getGender());
    		userDTO.setLastName(user.getLastName());
    		userDTO.setEmail(user.getEmail());
    		userDTO.setPassword(user.getPassword());
    		userDTO.setMobileTelephone(user.getFixedTelephone());
    		userDTO.setFixedTelephone(user.getFixedTelephone());
    		userDTO.setAdress(user.getAdress());
    		userDTO.setPostalCode(user.getPostalCode());
    		userDTO.setTown(user.getTown());
    		userDTO.setProfession(user.getProfession());
    		userDTO.setProfile(user.getProfile());
    		userDTO.setMaritalSituation(user.getMaritalSituation());
    		userDTO.setChildrenNumber(user.getChildrenNumber());
    		userDTO.setDependant(user.getDependant());
    		userDTO.setOwnedOrRentedAccommodation(user.getOwnedOrRentedAccommodation());
    		userDTO.setMonthlyNetSalary(user.getMonthlyNetSalary());
    		userDTO.setRentAmount(user.getRentAmount());
    		userDTO.setIsBankLoan(user.getIsBankLoan());
    		userDTO.setCapitalContribution(user.getCapitalContribution());
    		userDTO.setCreditAmount(user.getCreditAmount());
    		userDTO.setMonthlyPayment(user.getMonthlyPayment());
    		userDTO.setCreditTerminationDate(user.getCreditTerminationDate());
    		userDTO.setSIRETNumber(user.getSIRETNumber());
     
    		Set<ProduitImmobilier> setProduitImmobiliers = user.getRealEstateProperty();
    		List<ProduitImmobilierDTO> setProduitImmobilierDTOs = new ArrayList<>();
     
    		setProduitImmobiliers.forEach(p ->{ ProduitImmobilierDTO pDTO = produitImmobilierService.convertProduitImmobilierToProduitImmobilierDTO(p, setProduitImmobiliers.size()); setProduitImmobilierDTOs.add(pDTO);});
     
    		Comparator<ProduitImmobilierDTO> compareByIdDesc = new Comparator<ProduitImmobilierDTO>() {
    		    @Override
    		    public int compare(ProduitImmobilierDTO o1, ProduitImmobilierDTO o2) {
    		        return o2.getId().compareTo(o1.getId());
    		    }
    		};
    		Collections.sort(setProduitImmobilierDTOs, compareByIdDesc);
    		userDTO.setRealEstateProperty(setProduitImmobilierDTOs);
    		return userDTO;
    	}
     
    	public User convertUserDTOToUser(UserDTO userDTO) {
    		User user = new User();
    		user.setId(userDTO.getId());
    		user.setGender(userDTO.getGender());
    		user.setLastName(userDTO.getLastName());
    		user.setEmail(userDTO.getEmail());
    		user.setPassword(userDTO.getPassword());
    		user.setMobileTelephone(userDTO.getFixedTelephone());
    		user.setFixedTelephone(userDTO.getFixedTelephone());
    		user.setAdress(userDTO.getAdress());
    		user.setPostalCode(userDTO.getPostalCode());
    		user.setTown(userDTO.getTown());
    		user.setProfession(userDTO.getProfession());
    		user.setProfile(userDTO.getProfile());
    		user.setMaritalSituation(userDTO.getMaritalSituation());
    		user.setChildrenNumber(userDTO.getChildrenNumber());
    		user.setDependant(userDTO.getDependant());
    		user.setOwnedOrRentedAccommodation(userDTO.getOwnedOrRentedAccommodation());
    		user.setMonthlyNetSalary(userDTO.getMonthlyNetSalary());
    		user.setRentAmount(userDTO.getRentAmount());
    		user.setIsBankLoan((userDTO.getIsBankLoan().equals(new Byte((byte) 0))) ? false : userDTO.getIsBankLoan().equals(new Byte((byte) 1)) ? true : null  );
    		user.setCapitalContribution(userDTO.getCapitalContribution());
    		user.setCreditAmount(userDTO.getCreditAmount());
    		user.setMonthlyPayment(userDTO.getMonthlyPayment());
    		user.setCreditTerminationDate(new Date(userDTO.getCreditTerminationDate()));
    		user.setSIRETNumber(userDTO.getSIRETNumber());
    		return user;
    	}
     
    }

  8. #8
    Membre confirmé Avatar de Kazh Du
    Homme Profil pro
    Développeur Java
    Inscrit en
    Novembre 2011
    Messages
    152
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2011
    Messages : 152
    Points : 561
    Points
    561
    Par défaut
    La résolution de ce problème est simple. Ton service n'est pas indiqué comme tel.
    Il faut ajouter l’annotation @Service à ta classe UserServiceImpl.

    Vérifie bien que tous tes beans soient clairement identifiés.
    Merci d'ajouter un sur les tags qui vous ont aidé

  9. #9
    Membre actif
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    728
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 728
    Points : 250
    Points
    250
    Par défaut
    Bonsoir Kazh Du, c'était effectivement simple. Meri

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Eclipse 3.4.0: type error class not found : XrayLogger
    Par Ouaich75 dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 13/10/2008, 15h31
  2. Erreur avec skin: [error] File not found 'vclskin.res'
    Par Siguillaume dans le forum Langage
    Réponses: 9
    Dernier message: 28/08/2008, 17h20
  3. error file not found: unit1.dfm
    Par bouzaidi dans le forum Delphi
    Réponses: 4
    Dernier message: 12/04/2007, 10h36
  4. [Error] File not found: 'Unit1.DFM'
    Par aliwassem dans le forum Delphi
    Réponses: 1
    Dernier message: 08/04/2007, 07h13

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo