我将项目发布到GitLab Pages并添加我的自定义域。现在,我想将默认的GitLab URL package com.example.springbootdemo.controllers;
import com.example.springbootdemo.model.Box;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.springbootdemo.repositories.BoxRepository;
@RestController
public class BoxController {
@Autowired
BoxRepository boxrepository;
@PostMapping("/box")
public Box addBox(Box box){
return this.boxrepository.save(box);
}
}
重定向到我的域名username.gitlab.io/project
。我在DNS中添加了两条记录,如下所示:
mydomain.com
但是没用。我该怎么办?