0

I have deployed a spring boot project in AWS EC2. one of controller i have added @Scheduled this annotation to execute function daily. It has been worked but i have got some error messages recently. I have done some research about this error and tried to fix it but the message still show up. could anyone give me any ideas to solve the problem? thank you for advance

Controller:

@Scheduled(cron = "0 0 0 * * ?")
public void overloadAdsInMidnight() {
    Date yesterDay = DateUtility.getMinDate(DateUtility.calculateDate(new Date(), null, null, -1));
    String yesterDayStr = DateUtility.dateToStr(yesterDay, DateUtility.YYYYMMDD);
    this.synchronizeAdsByCreateAndUpdate(yesterDayStr);
}

@RequestMapping(value = "/overloadAdsByDate", method = RequestMethod.GET)
public ResponseEntity<String> synchronizeAdsByCreateAndUpdate(@RequestParam String date) {

    try {

        LocalDateTime actionDateTime = LocalDateTime.now();
        this.facebookAdsServ.synchronizeFacebookAdsByDate(date);

        LOG.info("overload data startDateTime : {}", actionDateTime);

    } catch (Exception e) {
        e.printStackTrace();
    }

    return new ResponseEntity<>(SUCCESS_MESSAGE, HttpStatus.OK);

}

tomcat server.xml

<Connector
        port="8081"
        protocol="HTTP/1.1"
        connectionTimeout="20000"
        redirectPort="8443"
        maxHttpHeaderSize="8192" />

Error Message

Jack
  • 3
  • 1
  • 5
  • https://stackoverflow.com/questions/38891866/when-spring-boot-startup-throw-out-the-method-names-must-be-tokens-exception – Sofo Gial Dec 19 '18 at 09:24

1 Answers1

0

Are you trying to execute send any https request from your app in which https is not enabled ?? make sure you have enabled https. if client which is trying to send https request even though HTTPS is NOT ENABLED ON CLIENT SIDE then you may get this error

cheer :)

prasannajoshi
  • 147
  • 11