是否有可能在实体框架6中创建具有代码优先和注释的单向多对多关联?例:
class Currency
{
public int id { get; set; }
}
class Country
{
public int id { get; set; }
// How i can annotate this property to say EF that it is many-to-many
// and it should create mapping table?
// I don't need navigation property to Country in Currency class!
public virtual IList<Currency> currencies { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
在Java + JPA注释中,我可以通过这种方式实现我需要的东西:
@OneToMany
@JoinTable(name = "MAPPING_TABLE", joinColumns = {
@JoinColumn(name = "THIS_ID", referencedColumnName = "ID")
}, …Run Code Online (Sandbox Code Playgroud) 我有一个结构如下的项目:
main-project
-libary-1
-library-2
-i-need-javafx-app-here
所以,我需要在我的maven项目中使用JavaFX 2应用程序,它应该使用library-1和library-2及其依赖项.我找不到JavaFX 2项目的任何maven原型,我可以找到有关如何通过Maven 3构建JavaFX应用程序的任何充分信息.我不需要任何部署到Web,它只会是桌面应用程序.
那么,任何人都可以帮助解决这个问题吗?
UPD:
java.lang.NoClassDefFoundError: javafx/application/Application
...
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
当我尝试运行由pgras方式构建的应用程序时发生异常.
我需要为指定 root 中的所有路由提供静态html文件。我试图用注释控制器的方法,但它仅适用于路由,而不是' ,等...(/src/main/resources/static/folder/index.html)(as example '/main/\**')@RequestMapping("/main/**")'/main'/main/foo''/main/foo/bar'
那么,我如何在 Spring Boot 中做到这一点?