spring-rest

    2熱度

    1回答

    任何人都知道爲什麼它不起作用? Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 06/04/2017 14:11:24.732 ERROR [main] - org.springframework.bo

    0熱度

    1回答

    我有基於斷指南上spring.io簡單RepositoryRestResource @RepositoryRestResource(collectionResourceRel = "people", path = "people") public interface PersonRepository extends PagingAndSortingRepository<Person, Long>

    2熱度

    1回答

    我在線閱讀,@Service用於服務層(業務邏輯),@Controller用於API端點,而@Repository用於持久層。 在我的公司,代碼結構爲: Client -> Rest endpoint -> service -> DAO -> database 什麼困惑我的是,在DAO層,被註釋爲@Service(實際上兩者的服務和DAO層也標註爲@Service) 是否有任何DAO註釋爲@S

    -1熱度

    1回答

    在Spring REST風格的Web服務中,所有的REST(Representational State Transfer)方法都是冪等的嗎?不管有多少次被輸入的命令,相同的結果應用於

    0熱度

    1回答

    在官方春天教程代碼source coode有沒有控制器需要,所以我沒有把它們放在我的樣品中,但是當我嘗試運行我的簡單的應用程序我一直得到了http://localhost:8080/或http://localhost:8080/invoice錯誤: Whitelabel Error Page This application has no explicit mapping for /error,

    0熱度

    1回答

    我必須在我的應用程序中添加一個或多個用戶角色。目前,我每次一個角色添加到用戶使用這種方法: UserController.java @RequestMapping(value = "users/{id}/{roleId}", method = RequestMethod.POST) public User assignRole(@PathVariable Long id, @PathVariab

    1熱度

    2回答

    我使用下面通過RestTemplate在春季4檢索JSON: protected DocInfoResponse retrieveData(String urlWithAuth) { RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); head

    0熱度

    1回答

    的Java ResponseEntity<PerfectPropsMatchClass> resp= restTemplate.getForEntity(url, PerfectPropsMatchClass.class) PerfectPropsMatchClass props = resp.getBody(); 我不得不創建PerfectPropsMatchClass類B/C我Props

    0熱度

    1回答

    我有點困惑,需要幫助理解我可以爲用戶定義REST URI的方式。 要求:我想實現類似如下: GET URI:/用戶/我/地址:這個API將通過客戶端只(IOS)被調用。用戶細節將從auth令牌獲取,返回的對象將排除某些字段。 GET URI:/用戶/ {用戶id} /地址:這個API將通過客戶服務門戶網站調用和返回的對象將所有的領域 要做到這一點我暴露兩種方法之一與URI '/ users/me/

    1熱度

    3回答

    我有一個簡單的Spring-Boot Restful應用程序。我有一個Controller層和一個Repository層,但沒有Service層。讓我告訴你我的控制器方法之一: @RequestMapping(value = "users/{id}", method = RequestMethod.GET) public Resource<UserResource> get(@PathVaria