I try to do API webservice by Spring-boot but I get an error "Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sun Apr 21 13:42:49 ICT 2019 There was an unexpected error (type=Not Found, status=404). No message available"
ArrestGetByConApplication.java :
package com.arrestbycon.arrestGetByCon;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan
public class ArrestGetByConApplication {
public static void main(String[] args) {
SpringApplication.run(ArrestGetByConApplication.class, args);
}
}
and some of my controller :
package com.arrestbycont.arrestGetByCon;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.sql.*;
import java.util.ArrayList;
import com.arrestbycon.arrestGetByCon.Result;
@RestController
public class GetByCon {
@RequestMapping(value = "/test", method = RequestMethod.GET)
public ArrayList<Result> getResult() {
Integer arr_id;
Integer off_id;
String arr_code;
String off_code;
String off_name;
ArrayList<Object> myArrlist = new ArrayList<Object>();