jhipster

Spring Boot with Embedded Undertow behind AWS ELB - HTTP to HTTPS redirect

折月煮酒 提交于 2019-11-26 22:10:25
问题 I'm running a Spring boot (Jhipster/Undertow) application on port 8080 on an AWS EC2 instance. I have an AWS ELB configured to redirect 80 -> 8080 443 (SSL termination happens here) -> 8080 The application uses Spring Security and if you user arrives to http://example.com I want it to redirect to https://example.com, to use SSL. I have found various examples of configuring this in Tomcat but none using Undertow. I have tried this, with a second port 8089, and it does redirect as required, but

Can't create custom query method in Spring Data Repository [duplicate]

梦想与她 提交于 2019-11-26 21:01:54
问题 This question already has answers here : How to add custom method to Spring Data JPA (10 answers) Closed last year . I wanted to create custom repository : public interface FriendRepositoryCustom { Page<Friend> findFriends(FriendCriteria friendCriteria, Pageable pageable); } And its implementation : @Repository @Transactional(readOnly = true) public class FriendRepositoryCustomImpl implements FriendRepositoryCustom { @PersistenceContext EntityManager entityManager; @Override public Page

jhipster oauth : How can i get the access_token via CURL

无人久伴 提交于 2019-11-26 20:58:31
问题 i'm trying to use the jhipster tool in order to create a new project with the oauth2 authentication. The project example work fine, i can login with the angularjs interface, but can't understand how can i create a new user and then get the access token via Curl command line for this new user. Thanks for your help 回答1: Step #1: Register the user. Register a user at http://localhost:8080/#/register and make sure you can log in via the web interface. Step #2: Obtain an OAuth2 token. Information

How to add self signed SSL certificate to jHipster sample app?

对着背影说爱祢 提交于 2019-11-26 18:54:35
问题 I have create sample jHipster app. Now I want to add self signed SSL certificate and test in local to have a access to https. How to achieve this? 回答1: These instructions are applicable for all Spring Boot applications, on which JHipster is based. I have tested this on a newly generated JHipster 2.7 project. You need to complete these steps when starting from scratch: Generate a self-signed certificate Add the SSL properties to your application.properties or application.yml as mentioned in

jHipster开发中对配置文件.yo-ce.json分析

安稳与你 提交于 2019-11-25 23:17:20
最近的项目开发是基于jHipster这个框架,借助这个框架快速部署基于Spring Boot + Angular Web的应用确实很痛快,不过,由于各种自动化配置,这样会导致在快速的变更迭代过程中,遇到各种坑,是这样的啦,前人造轮,后人乘车,车子出问题,找轮子两眼一抹黑啦,这当然需要花相当多的时间去填上,这当然需要花相当多的时间去填上,这次主要是分析其中的一个配置文件,yo-ce.json这个文件,由于不熟悉其中的某些属性,导致开发进度拖累,写一份开发笔记记录下 首先,我们知道这个是配置脚本是属于yeoman体系,文件结构为json,接下来的分析都是基于yo-rc文件的api内容。这个文件存储了多个生成器的配置文件,现在以jhipster中自动生成的配置文件为例 { "generator-jhipster": { "promptValues": { "packageName": "xxx.yyy.zzz" }, "jhipsterVersion": "5.7.1", "applicationType": "monolith", "baseName": "zzz", "packageName": "xxx.yyy.zzz", "packageFolder": "xxx/yyy/zzz", "serverPort": "8080", "authenticationType": "jwt

网盘进化史就这样(下)——功能实现

﹥>﹥吖頭↗ 提交于 2019-11-25 22:31:02
上回说到网盘的思路简单设计以及和升级迭代的过程 详细内容请回顾https://blog.51cto.com/yerikyu/2361380 本文主要是介绍,如何通过jHipster快速搭建网络云盘服务。 我们使用jHipster构建一个web服务是一件简单便捷的事情,启动起来也很舒服的,如下图所示,通过命令jhipster就可以启动该框架为我们提供创建项目的功能 之后是进行项目名称的设置,还有包名,认证方式等配置设置。不懂的话,建议一直回车选择默认配置,之后在数据库选型这一栏,由于项目需要,这里我们选择mongodb。 之后我们还需要选择启动仓库,笔者习惯使用gradle 其他的按照默认配置就行啦,之后还是一样的 ,一路回车暴击,等待项目创建完成,你们会观察到创建项目中,不断的新建文件以及相关依赖的进度条,等待创建完成。 这样就形成了我们的构建的web服务了,服务可以启动了,然而毕竟是通过框架搭建起来的web服务还是比较简单的,我们需要再进行个性化开发。在图中我们可以看到一个清晰的后端服务框架 因为我们在创建项目的过程中,已经明确说明需要用到mangodb,因此,框架已经为我们提供了mangodb数据库的docker-compose文件,我们可以直接使用的,不过此时docker container的数据是不会保存的,如果我们重启docker服务,将会导致数据丢失