我使用Brew安装后无法运行Mysql.我正在使用OS X El Capitan版本10.11.3和Mysql Server版本5.7.11.当我启动服务器时,我收到:
启动MySQL.错误!服务器退出而不更新PID文件(/usr/local/var/mysql/Hedis-MacBook-Pro.local.pid).
这就是我在我的错误文件中得到的:
2016-03-19T20:59:45.907542Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
Run Code Online (Sandbox Code Playgroud)
有人之前有这个吗?非常感谢.
我正在尝试使用Spring Boot Test做一个简单的集成测试,以测试e2e用例。我的测试无法正常工作,因为我无法使存储库保存数据,我认为我的Spring上下文有问题...
这是我的实体:
@Entity
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Person {
@Id
private int id;
private String name;
}
Run Code Online (Sandbox Code Playgroud)
这是个人资料库:
@Repository
public interface PersonRepository extends JpaRepository<Person, Integer> {
}
Run Code Online (Sandbox Code Playgroud)
人员服务:
@Service
public class PersonService {
@Autowired
private PersonRepository repository;
public Person createPerson(int id,String name) {
return repository.save(new Person(id, name));
}
public List<Person> getPersons() {
return repository.findAll();
}
}
Run Code Online (Sandbox Code Playgroud)
人员控制器:
@RequestMapping
@RestController
public class PersonController {
@Autowired
private PersonService personService;
@RequestMapping("/persons")
public List<Person> getPersons() {
return personService.getPersons();
}
Run Code Online (Sandbox Code Playgroud)
} …