Tag: jhipster

有一种简单的方法可以在Jhipster微服务网关上添加社交登录吗?

当我使用yo生成一个单一的应用程序时,我被问到是否要使用社交登录,但在微服务模型的网关创建过程中不会发生这种情况。 是否有一种在微服务网关上添加社交登录的简单方法,还是我需要手动创建?

JHipster:允许匿名用户读取实体,但不更新?

我使用这些值生成了一个JHipster应用程序: { “generator-jhipster”: { “jhipsterVersion”: “3.1.0”, “baseName”: “app”, “packageName”: “my.app”, “packageFolder”: “my/app”, “serverPort”: “8080”, “authenticationType”: “session”, “hibernateCache”: “ehcache”, “clusteredHttpSession”: “no”, “websocket”: “no”, “databaseType”: “sql”, “devDatabaseType”: “h2Disk”, “prodDatabaseType”: “mysql”, “searchEngine”: “elasticsearch”, “buildTool”: “gradle”, “enableSocialSignIn”: false, “rememberMeKey”: “”, “useSass”: true, “applicationType”: “monolith”, “testFrameworks”: [], “jhiPrefix”: “jhi”, “enableTranslation”: false } } 我想允许匿名用户查看实体,但不允许更新或删除该实体。 我已经尝试编辑生成的SecurityConfiguration.java文件,以便在configure(HttpSecurity http)方法中为authorizeRequests()添加permitAll(HttpMethod.GET,”/**”) 。 在尝试访问实体时,我仍然被定向到accessdenied 。 有人曾经解决过这个用例吗?

Jlastic的弹性搜索,Spring

有人能举例说明在jHipster或Spring-boot中使用Elasticsearch吗? 我已经使用jHipster生成了实体。 有占位符的输入:查询! /** * SEARCH /_search/samples/:query -> search for the sample corresponding * to the query. */ @RequestMapping(value = “/_search/samples/{query}”, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public List search(@PathVariable String query) { return StreamSupport .stream(sampleSearchRepository.search(queryString(query)).spliterator(), false) .collect(Collectors.toList()); } 如何使用elasticsearch? 这里有一些我在生成实体中找到的脚本! 我已经尝试过放置Object , q = field:value , 弹性格式的数组,并且总是得到空数组 。 抱歉英语不好!

Jhipster上的两个MySQL数据库

我正在使用jHipster,它很棒,因为大多数的样板代码都是自动生成的。 在我的应用程序中,我需要两个MySQL数据库。 我该如何配置它们? 我应该为两个不同的模式有两个不同的数据库配置文件吗? 此外,jHipster使用Liquibase,那么如何更改DatabaseConfiguration类?

将jhipster后端和前端分成两个项目?

我正在尝试使用基于令牌的身份validation的jhipster 。 它完美地运作。 现在, 我想在不同的域上运行后端和前端代码 。 我怎样才能做到这一点? 这是我试过的: 运行yo jhipster并选择基于令牌的身份validation选项: Welcome to the JHipster Generator ? (1/13) What is the base name of your application? jhipster ? (2/13) What is your default Java package name? com.mycompany.myapp ? (3/13) Do you want to use Java 8? Yes (use Java 8) ? (4/13) Which *type* of authentication […]

JHipster按其实体的字段搜索实体

我有锦标赛实体。 他与Prize实体有OneToOne关系。 奖品实体已提交“金额”。 因此,如果我想要搜索具有2个值之间的奖项的锦标赛,我该如何使用JHipster QueryService?

无法将DaoAuthenticationConfigurer应用于已构建的对象

我得到了这个例外: [WARN] org.springframework.web.context.support.GenericWebApplicationContext – Exception encountered during context initialization – cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accountResource’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private io.ilopezluna.japanathome.service.UserService io.ilopezluna.japanathome.web.rest.AccountResource.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: […]

更新JHipster生成器后如何更新JHipster项目?

我通过运行命令更新了我的JHipster安装 npm update -g generator-jhipster 但是要更新我的应用程序,我不知道我应该在哪里运行下一个命令yo jhipster 。 我尝试从现有项目的根目录运行它,但它要求我输入新项目的名称。 我尝试在现有项目的根目录之上运行它,然后它也问我新项目的名称。 但是这次我输入了相同的名字并且jhipster生成过程运行了。 但是,任何主要文件都没有变化,如package.json或Gruntfile.js或bower.json 一旦JHipster生成器更新,更新JHipster项目的正确方法是什么?