From 4d465870e720086d684aa21090ba2ca43406c39b Mon Sep 17 00:00:00 2001 From: Nicolas Romanetti Date: Tue, 20 Feb 2018 08:31:13 +0100 Subject: [PATCH] Revert "a little change" --- .../src/main/java/Application.java.p.vm | 13 +- .../java/audit/AuditContextHolder.p.vm.java | 6 +- .../config/SecurityConfiguration.java.p.vm | 2 +- .../config/SwaggerConfiguration.java.p.vm | 2 +- .../src/main/java/domain/Entity.java.e.vm | 14 +- .../support/IdentifiableHashBuilder.java.p.vm | 3 +- .../main/java/dto/EntityDTOService.java.e.vm | 12 +- .../support/PageRequestByExample.java.p.vm | 1 + .../main/java/rest/EntityResource.java.e.vm | 35 +++-- .../main/java/rest/SecurityResource.java.p.vm | 7 +- ...AjaxAuthenticationFailureHandler.java.p.vm | 3 +- ...AjaxAuthenticationSuccessHandler.java.p.vm | 4 +- .../security/UserDetailsServiceImpl.java.p.vm | 18 ++- .../main/java/security/UserWithId.p.vm.java | 7 +- .../impl/FixedLengthValidator.p.vm.java | 2 +- .../web/src/app/app.component.html.p.vm | 49 ------- .../web/src/app/app.component.ts.p.vm | 121 +++++++++++++----- .../web/src/app/app.module.ts.p.vm | 18 +-- .../web/src/app/app.routes.ts.p.vm | 10 +- .../entity-auto-complete.component.html.e.vm | 6 - .../entity-auto-complete.component.ts.e.vm | 55 ++++---- .../entity-detail.component.html.e.vm | 2 +- .../entities/entity-detail.component.ts.e.vm | 41 +++--- .../entities/entity-line.component.ts.e.vm | 13 ++ .../entities/entity-list.component.html.e.vm | 2 +- .../entities/entity-list.component.ts.e.vm | 64 ++++----- .../src/app/entities/entity.service.ts.e.vm | 45 ++++--- .../web/src/app/entities/entity.ts.e.vm | 20 ++- .../web/src/app/home.component.ts.p.vm | 1 + .../web/src/app/service/auth.service.ts.p.vm | 79 ++++++------ .../src/app/service/message.service.ts.p.vm | 42 ++---- .../confirm-delete-dialog.component.ts | 2 +- .../web/src/app/support/paging.ts.p.vm | 18 +-- .../celerio/pack-angular/web/src/styles.css | 7 +- quickstart/README.md | 2 +- quickstart/pom.xml | 12 +- 36 files changed, 397 insertions(+), 341 deletions(-) delete mode 100644 pack-angular/celerio/pack-angular/web/src/app/app.component.html.p.vm delete mode 100644 pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.html.e.vm create mode 100644 pack-angular/celerio/pack-angular/web/src/app/entities/entity-line.component.ts.e.vm diff --git a/pack-angular/celerio/pack-angular/src/main/java/Application.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/Application.java.p.vm index e9102e0..956630b 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/Application.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/Application.java.p.vm @@ -16,6 +16,7 @@ $output.java($Root,"Application")## import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer; import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; import org.springframework.boot.web.servlet.ErrorPage; import org.springframework.context.annotation.Bean; @@ -28,10 +29,16 @@ public class Application { SpringApplication.run(Application.class, args); } - // http://stackoverflow.com/questions/36761019/how-can-i-use-angular2-pathlocationstrategy-in-a-spring-boot-application @Bean public EmbeddedServletContainerCustomizer containerCustomizer() { - return container -> container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/")); + return new Angular2PathLocationStrategyCustomizer(); + } + + // http://stackoverflow.com/questions/36761019/how-can-i-use-angular2-pathlocationstrategy-in-a-spring-boot-application + private static class Angular2PathLocationStrategyCustomizer implements EmbeddedServletContainerCustomizer { + @Override + public void customize(ConfigurableEmbeddedServletContainer container) { + container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/")); + } } - } diff --git a/pack-angular/celerio/pack-angular/src/main/java/audit/AuditContextHolder.p.vm.java b/pack-angular/celerio/pack-angular/src/main/java/audit/AuditContextHolder.p.vm.java index de2aa14..279ad9b 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/audit/AuditContextHolder.p.vm.java +++ b/pack-angular/celerio/pack-angular/src/main/java/audit/AuditContextHolder.p.vm.java @@ -14,7 +14,7 @@ ## $output.java($Audit, "AuditContextHolder")## -$output.requireStatic("org.apache.commons.lang3.StringUtils.trimToNull")## +$output.requireStatic("org.apache.commons.lang.StringUtils.trimToNull")## $output.require("javax.persistence.PrePersist")## $output.require("javax.persistence.PreUpdate")## $output.require($Security, "UserContext")## @@ -24,8 +24,8 @@ * Please note that you are in charge of reseting the context properties if you use them directly. */ public final class $output.currentClass { - private static final ThreadLocal audit = new ThreadLocal<>(); - private static final ThreadLocal username = new ThreadLocal<>(); + private static final ThreadLocal audit = new ThreadLocal(); + private static final ThreadLocal username = new ThreadLocal(); private ${output.currentClass}(){ } diff --git a/pack-angular/celerio/pack-angular/src/main/java/config/SecurityConfiguration.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/config/SecurityConfiguration.java.p.vm index 9305585..8698294 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/config/SecurityConfiguration.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/config/SecurityConfiguration.java.p.vm @@ -39,7 +39,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { } @Override - public void configure(WebSecurity web) { + public void configure(WebSecurity web) throws Exception { web.ignoring(). // antMatchers(HttpMethod.OPTIONS, "/**"). // antMatchers("/"). // diff --git a/pack-angular/celerio/pack-angular/src/main/java/config/SwaggerConfiguration.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/config/SwaggerConfiguration.java.p.vm index 0606fa1..562074b 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/config/SwaggerConfiguration.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/config/SwaggerConfiguration.java.p.vm @@ -30,7 +30,7 @@ $output.require("springfox.documentation.builders.RequestHandlerSelectors")## @Configuration @EnableSwagger2 public class SwaggerConfiguration { - private final Logger log = LoggerFactory.getLogger(getClass()); + private final Logger log = LoggerFactory.getLogger(SwaggerConfiguration.class); @Bean public Docket swaggerSpringfoxDocket() { diff --git a/pack-angular/celerio/pack-angular/src/main/java/domain/Entity.java.e.vm b/pack-angular/celerio/pack-angular/src/main/java/domain/Entity.java.e.vm index 375fa91..5ee71a2 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/domain/Entity.java.e.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/domain/Entity.java.e.vm @@ -165,7 +165,7 @@ $output.require($manyToMany.to)## @Override $output.dynamicAnnotation("javax.persistence.Transient") public boolean ${entity.primaryKey.has}() { - return $entity.primaryKey.var != null && $entity.primaryKey.var.areFieldsSet(); + return ${entity.primaryKey.getter}() != null && ${entity.primaryKey.getter}().areFieldsSet(); } #end #if ($entity.isAccount()) @@ -609,7 +609,7 @@ $output.require("$entity.collectionType.implementationFullType")## */ @Override public boolean equals(Object other) { - return ${output.currentRootCast}this == other || other instanceof $output.currentClass && hashCode() == other.hashCode(); + return ${output.currentRootCast}this == other || (other instanceof $output.currentClass && hashCode() == other.hashCode()); } #if($entity.useBusinessKey()) @@ -667,7 +667,7 @@ $output.require("com.jaxio.jpa.querybyexample.LocaleHolder")## String language = LocaleHolder.getLocale().getLanguage().toLowerCase(); #foreach($attribute in $bundle.attributes) if (language.equals("$attribute.columnNameLanguage")) { - return $attribute.var; + return ${attribute.getter}(); } #end throw new IllegalStateException("Could not find the proper getter for current locale's language " + language); @@ -684,7 +684,7 @@ $output.require("com.jaxio.jpa.querybyexample.LocaleHolder")## return #if ($entity.hasParent())super.toString() + #{end}MoreObjects.toStringHelper(this) // #foreach ($attribute in $entity.nonCpkAttributes.list) #if(!$attribute.isInFk() || $attribute.isSimplePk()) - .add("${attribute.var}", #if($attribute.isPassword())"XXXX"#else$attribute.var#end) // + .add("${attribute.var}", #if($attribute.isPassword())"XXXX"#else${attribute.getter}()#end) // #end #end .toString(); @@ -709,13 +709,13 @@ $output.require("com.jaxio.jpa.querybyexample.LocaleHolder")## $output.dynamicAnnotation("javax.persistence.Transient") public void copyTo($entity.model.type $entity.model.var) { #if ($entity.isRoot() && $entity.primaryKey.isComposite()) - if ($entity.primaryKey.var != null) { - ${entity.model.var}.${entity.primaryKey.setter}($entity.primaryKey.var.copy()); + if (${entity.primaryKey.getter}() != null) { + ${entity.model.var}.${entity.primaryKey.setter}(${entity.primaryKey.getter}().copy()); } #end #foreach ($attribute in $entity.nonCpkAttributes.list) #if ($attribute.isSetterAccessibilityPublic()) - ${entity.model.var}.${attribute.setter}($attribute.var); + ${entity.model.var}.${attribute.setter}(${attribute.getter}()); #end #end #foreach ($xToOne in $entity.xToOne.list) diff --git a/pack-angular/celerio/pack-angular/src/main/java/domain/support/IdentifiableHashBuilder.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/domain/support/IdentifiableHashBuilder.java.p.vm index f5d26e0..d5dfea2 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/domain/support/IdentifiableHashBuilder.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/domain/support/IdentifiableHashBuilder.java.p.vm @@ -16,7 +16,6 @@ $output.java($ModelSupport, "IdentifiableHashBuilder")## $output.require("java.io.Serializable")## $output.require("java.util.logging.Logger") -$output.require("java.rmi.dgc.VMID") $output.require("${ModelSupport.packageName}.Identifiable")## /** @@ -35,7 +34,7 @@ public class $output.currentClass implements Serializable { if (identifiable.${identifiableProperty.iser}()) { technicalId = identifiable.${identifiableProperty.getter}(); } else { - technicalId = new VMID(); + technicalId = new java.rmi.dgc.VMID(); log.warning("DEVELOPER: hashCode is not safe." // + "If you encounter this message you should take the time to carefuly " // + "review the equals/hashCode methods for: " + identifiable.getClass().getCanonicalName() // diff --git a/pack-angular/celerio/pack-angular/src/main/java/dto/EntityDTOService.java.e.vm b/pack-angular/celerio/pack-angular/src/main/java/dto/EntityDTOService.java.e.vm index d6d9f06..587e64d 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/dto/EntityDTOService.java.e.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/dto/EntityDTOService.java.e.vm @@ -93,10 +93,12 @@ $output.require($relation.toEntity.model) ## example = Example.of($entity.model.var, matcher); } - Page<$entity.model.type> page = example != null ? - ${entity.repository.var}.findAll(example, req.toPageable()) : - ${entity.repository.var}.findAll(req.toPageable()); - + Page<$entity.model.type> page; + if (example != null){ + page = ${entity.repository.var}.findAll(example, req.toPageable()); + } else { + page = ${entity.repository.var}.findAll(req.toPageable()); + } List<$entity.dto.type> content = page.getContent().stream().map(this::toDTO).collect(Collectors.toList()); return new PageResponse<>(page.getTotalPages(), page.getTotalElements(), content); @@ -136,7 +138,7 @@ $output.require($relation.toEntity.model) ## ${entity.model.var}.${relation.to.setter}(null); } else { $relation.to.type $relation.to.var = ${entity.model.var}.${relation.to.getter}(); - if ($relation.to.var == null || ${relation.to.var}.getId().compareTo(dto.${relation.to.var}.id) != 0) { + if ($relation.to.var == null || (${relation.to.var}.getId().compareTo(dto.${relation.to.var}.id) != 0)) { ${entity.model.var}.${relation.to.setter}(${relation.toEntity.repository.var}.findOne(dto.${relation.to.var}.id)); } } diff --git a/pack-angular/celerio/pack-angular/src/main/java/dto/support/PageRequestByExample.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/dto/support/PageRequestByExample.java.p.vm index ebe633a..1b95b8e 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/dto/support/PageRequestByExample.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/dto/support/PageRequestByExample.java.p.vm @@ -1,5 +1,6 @@ $output.java("${Root.packageName}.dto.support","PageRequestByExample")## +$output.require("org.springframework.data.domain.Example")## $output.require("org.springframework.data.domain.Pageable")## public class PageRequestByExample { diff --git a/pack-angular/celerio/pack-angular/src/main/java/rest/EntityResource.java.e.vm b/pack-angular/celerio/pack-angular/src/main/java/rest/EntityResource.java.e.vm index bac0966..790e6a0 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/rest/EntityResource.java.e.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/rest/EntityResource.java.e.vm @@ -21,6 +21,7 @@ $output.require("java.math.BigInteger")## $output.require("java.util.Date")## #end $output.require($entity.dto)## +$output.require($entity.model)## $output.require($entity.root.primaryKey)## #foreach($enumAttribute in $entity.uniqueEnumAttributes.list) $output.require($enumAttribute)## @@ -42,9 +43,14 @@ $output.require("javax.inject.Inject")## $output.require("org.slf4j.LoggerFactory")## $output.require("org.slf4j.Logger")## +$output.requireStatic("org.springframework.web.bind.annotation.RequestMethod.GET")## +$output.requireStatic("org.springframework.web.bind.annotation.RequestMethod.POST")## +$output.requireStatic("org.springframework.web.bind.annotation.RequestMethod.PUT")## +$output.requireStatic("org.springframework.web.bind.annotation.RequestMethod.DELETE")## $output.require("org.springframework.web.bind.annotation.*")## - +$output.requireStatic("org.springframework.http.MediaType.APPLICATION_JSON_VALUE")## $output.require("org.springframework.http.ResponseEntity")## +$output.require("org.springframework.web.bind.annotation.RequestBody")## $output.require("org.springframework.http.HttpHeaders")## $output.require("org.springframework.http.HttpStatus")## @@ -53,7 +59,7 @@ $output.require("org.springframework.http.HttpStatus")## @RequestMapping("/api/${entity.model.vars}") public class $output.currentClass{ - private final Logger log = LoggerFactory.getLogger(getClass()); + private final Logger log = LoggerFactory.getLogger(${output.currentClass}.class); @Inject private $entity.repository.type $entity.repository.var; @@ -83,7 +89,7 @@ $output.require("java.beans.PropertyEditorSupport")## /** * Create a new ${entity.model.type}. */ - @PostMapping + @RequestMapping(value = "/", method = POST, produces = APPLICATION_JSON_VALUE) public ResponseEntity<$entity.dto.type> create(@RequestBody $entity.dto.type $entity.dto.var) throws URISyntaxException { log.debug("Create $entity.dto.type : {}", $entity.dto.var); @@ -102,8 +108,8 @@ $output.require("java.beans.PropertyEditorSupport")## /** * Find by id ${entity.model.type}. */ - @GetMapping("{id}") - public ResponseEntity<$entity.dto.type> findById(@PathVariable $entity.root.primaryKey.type $entity.root.primaryKey.var) { + @RequestMapping(value = "/{id}", method = GET, produces = APPLICATION_JSON_VALUE) + public ResponseEntity<$entity.dto.type> findById(@PathVariable $entity.root.primaryKey.type $entity.root.primaryKey.var) throws URISyntaxException { log.debug("Find by id $entity.model.type : {}", $entity.root.primaryKey.var); @@ -115,7 +121,7 @@ $output.require("java.beans.PropertyEditorSupport")## /** * Update ${entity.model.type}. */ - @PutMapping + @RequestMapping(value = "/", method = PUT, produces = APPLICATION_JSON_VALUE) public ResponseEntity<$entity.dto.type> update(@RequestBody $entity.dto.type $entity.dto.var) throws URISyntaxException { log.debug("Update $entity.dto.type : {}", $entity.dto.var); @@ -136,7 +142,7 @@ $output.require("org.springframework.web.bind.annotation.RequestParam")## /** * Target url for ${attribute.var} file upload. */ - @PostMapping("/{id}/upload/${attribute.var}") + @RequestMapping(value = "/{id}/upload/${attribute.var}", method = POST, produces = APPLICATION_JSON_VALUE) public ResponseEntity ${attribute.var}FileUpload(@PathVariable $entity.root.primaryKey.type $entity.root.primaryKey.var, @RequestParam("$attribute.var") MultipartFile multipartFile) { log.debug("File Upload: {}", multipartFile.getName()); @@ -169,7 +175,8 @@ $output.require("org.springframework.web.bind.annotation.RequestParam")## /** * File download facility for ${attribute.var}. */ - @GetMapping("/{id}/download/${attribute.var}") + @RequestMapping(value = "/{id}/download/${attribute.var}", method = GET) + @ResponseBody public ResponseEntity ${attribute.var}FileDownload(@PathVariable $entity.root.primaryKey.type $entity.root.primaryKey.var) { $entity.model.type $entity.model.var = ${entity.repository.var}.findOne($entity.root.primaryKey.var); @@ -196,8 +203,8 @@ $output.require("org.springframework.web.bind.annotation.RequestParam")## /** * Find a Page of $entity.model.type using query by example. */ - @PostMapping("page") - public ResponseEntity> findAll(@RequestBody PageRequestByExample<$entity.dto.type> prbe) { + @RequestMapping(value = "/page", method = POST, produces = APPLICATION_JSON_VALUE) + public ResponseEntity> findAll(@RequestBody PageRequestByExample<$entity.dto.type> prbe) throws URISyntaxException { PageResponse<$entity.dto.type> pageResponse = ${entity.dtoservice.var}.findAll(prbe); return new ResponseEntity<>(pageResponse, new HttpHeaders(), HttpStatus.OK); } @@ -205,8 +212,8 @@ $output.require("org.springframework.web.bind.annotation.RequestParam")## /** * Auto complete support. */ - @PostMapping("complete") - public ResponseEntity> complete(@RequestBody AutoCompleteQuery acq) { + @RequestMapping(value = "/complete", method = POST, produces = APPLICATION_JSON_VALUE) + public ResponseEntity> complete(@RequestBody AutoCompleteQuery acq) throws URISyntaxException { List<$entity.dto.type> results = ${entity.dtoservice.var}.complete(acq.query, acq.maxResults); @@ -216,8 +223,8 @@ $output.require("org.springframework.web.bind.annotation.RequestParam")## /** * Delete by id ${entity.model.type}. */ - @DeleteMapping("{id}") - public ResponseEntity delete(@PathVariable $entity.root.primaryKey.type $entity.root.primaryKey.var) { + @RequestMapping(value = "/{id}", method = DELETE, produces = APPLICATION_JSON_VALUE) + public ResponseEntity delete(@PathVariable $entity.root.primaryKey.type $entity.root.primaryKey.var) throws URISyntaxException { log.debug("Delete by id $entity.model.type : {}", $entity.root.primaryKey.var); diff --git a/pack-angular/celerio/pack-angular/src/main/java/rest/SecurityResource.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/rest/SecurityResource.java.p.vm index 0f078fb..fb11748 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/rest/SecurityResource.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/rest/SecurityResource.java.p.vm @@ -13,16 +13,17 @@ ## limitations under the License. ## $output.java("${Root.packageName}.rest","SecurityResource")## - +$output.requireStatic("org.springframework.web.bind.annotation.RequestMethod.GET")## $output.require("org.springframework.web.bind.annotation.*")## - +$output.requireStatic("org.springframework.http.MediaType.APPLICATION_JSON_VALUE")## +$output.require("javax.servlet.http.HttpServletRequest")## $output.require($Security, "UserContext")## @RestController @RequestMapping("/api") public class $output.currentClass{ - @GetMapping("authenticated") + @RequestMapping(value = "/authenticated", method = GET, produces = APPLICATION_JSON_VALUE) public boolean isAuthenticated() { return UserContext.getId() != null; } diff --git a/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationFailureHandler.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationFailureHandler.java.p.vm index d9c6768..af2bee7 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationFailureHandler.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationFailureHandler.java.p.vm @@ -4,6 +4,7 @@ import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; import org.springframework.stereotype.Component; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -16,7 +17,7 @@ public class $output.currentClass extends SimpleUrlAuthenticationFailureHandler @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, - AuthenticationException exception) throws IOException { + AuthenticationException exception) throws IOException, ServletException { response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication failed"); } } diff --git a/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationSuccessHandler.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationSuccessHandler.java.p.vm index 8395e85..8f30d6c 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationSuccessHandler.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/security/AjaxAuthenticationSuccessHandler.java.p.vm @@ -4,8 +4,10 @@ import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; import org.springframework.stereotype.Component; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; /** * Spring Security success handler, specialized for Ajax requests. @@ -15,7 +17,7 @@ public class $output.currentClass extends SimpleUrlAuthenticationSuccessHandler @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, - Authentication authentication) { + Authentication authentication) throws IOException, ServletException { response.setStatus(HttpServletResponse.SC_OK); } } diff --git a/pack-angular/celerio/pack-angular/src/main/java/security/UserDetailsServiceImpl.java.p.vm b/pack-angular/celerio/pack-angular/src/main/java/security/UserDetailsServiceImpl.java.p.vm index adb8f67..ab78ff0 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/security/UserDetailsServiceImpl.java.p.vm +++ b/pack-angular/celerio/pack-angular/src/main/java/security/UserDetailsServiceImpl.java.p.vm @@ -81,22 +81,30 @@ $output.require($project.accountEntity.repository)## #else if ("user".equals(username)) { String password = "user"; - List roles = new ArrayList<>(); + boolean enabled = true; + boolean accountNonExpired = true; + boolean credentialsNonExpired = true; + boolean accountNonLocked = true; + List roles = new ArrayList(); roles.add("ROLE_USER"); - return new UserWithId(username, password, toGrantedAuthorities(roles), null); + return new UserWithId(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, toGrantedAuthorities(roles), null); } if ("admin".equals(username)) { String password = "admin"; - List roles = new ArrayList<>(); + boolean enabled = true; + boolean accountNonExpired = true; + boolean credentialsNonExpired = true; + boolean accountNonLocked = true; + List roles = new ArrayList(); roles.add("ROLE_ADMIN"); - return new UserWithId(username, password, toGrantedAuthorities(roles), null); + return new UserWithId(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, toGrantedAuthorities(roles), null); } return null; #end } private Collection toGrantedAuthorities(List roles) { - List result = new ArrayList<>(); + List result = new ArrayList(); for (String role : roles) { result.add(new SimpleGrantedAuthority(role)); } diff --git a/pack-angular/celerio/pack-angular/src/main/java/security/UserWithId.p.vm.java b/pack-angular/celerio/pack-angular/src/main/java/security/UserWithId.p.vm.java index 1fefc18..5ab6094 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/security/UserWithId.p.vm.java +++ b/pack-angular/celerio/pack-angular/src/main/java/security/UserWithId.p.vm.java @@ -31,18 +31,13 @@ */ public class $output.currentClass extends User { private static final long serialVersionUID = 1L; - private final $idType id; + private $idType id; public ${output.currentClass}(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection authorities, $idType id) { super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities); this.id = id; } - - public UserWithId(String username, String password, Collection authorities, $idType id) { - super(username, password, authorities); - this.id = id; - } public $idType getId() { return id; diff --git a/pack-angular/celerio/pack-angular/src/main/java/validation/impl/FixedLengthValidator.p.vm.java b/pack-angular/celerio/pack-angular/src/main/java/validation/impl/FixedLengthValidator.p.vm.java index 24351a0..d283436 100644 --- a/pack-angular/celerio/pack-angular/src/main/java/validation/impl/FixedLengthValidator.p.vm.java +++ b/pack-angular/celerio/pack-angular/src/main/java/validation/impl/FixedLengthValidator.p.vm.java @@ -14,7 +14,7 @@ ## $output.java($ValidationImpl, "FixedLengthValidator")## -$output.requireStatic("org.apache.commons.lang3.StringUtils.isEmpty")## +$output.requireStatic("org.apache.commons.lang.StringUtils.isEmpty")## $output.require("javax.validation.ConstraintValidator")## $output.require("javax.validation.ConstraintValidatorContext")## $output.require($Validation, "FixedLength")## diff --git a/pack-angular/celerio/pack-angular/web/src/app/app.component.html.p.vm b/pack-angular/celerio/pack-angular/web/src/app/app.component.html.p.vm deleted file mode 100644 index 5a1d838..0000000 --- a/pack-angular/celerio/pack-angular/web/src/app/app.component.html.p.vm +++ /dev/null @@ -1,49 +0,0 @@ -$output.file("web/src/app/app.component.html")## - - -
-
The West...
- -
- -

When using the sample database, use admin/admin

-
-
-
- Invalid login or password -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
-
- -
-
-
diff --git a/pack-angular/celerio/pack-angular/web/src/app/app.component.ts.p.vm b/pack-angular/celerio/pack-angular/web/src/app/app.component.ts.p.vm index d59de95..4c6422c 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/app.component.ts.p.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/app.component.ts.p.vm @@ -1,5 +1,7 @@ $output.file("web/src/app/app.component.ts")## -import { Component, OnInit } from '@angular/core'; +import { Component,OnInit } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/throw'; import { Message, MenuItem } from 'primeng/primeng'; import { AuthService} from './service/auth.service'; @@ -10,27 +12,80 @@ import { MessageService} from './service/message.service'; * Defines the main layout and handles user login in a dialog. */ @Component({ - selector: 'app-root', - templateUrl: 'app.component.html', - styles: [` - .layout div { - background-color: white; - border: 1px solid #f5f7f8; - } - `] + moduleId: module.id, + selector: 'app-root', + template: ` + + +
+
The West...
+ +
+ +

When using the sample database, use admin/admin

+
+
+
+ Invalid login or password +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+
+ `, + styles:[` + .layout div { + background-color: white; + border: 1px solid #f5f7f8; + } + `] }) export class AppComponent implements OnInit { - items: MenuItem[] = [{label: 'hello'}]; - msgs: Message[] = []; + public items : MenuItem[] = [{label: 'hello'}]; + msgs : Message[] = []; - displayLoginDialog = false; - loginFailed = false; - authenticated = false; - j_username = 'admin'; - j_password = 'admin'; + displayLoginDialog : boolean = false; + loginFailed : boolean = false; + authenticated : boolean = false; + j_username : string = "admin"; + j_password : string = "admin"; constructor(private authService: AuthService, private messageService: MessageService) { - messageService.messageSource${d}.subscribe(msg => this.msgs.push(msg)); + messageService.messageSource${d}.subscribe( + msg => { + this.msgs.push(msg); + }); } ngOnInit() { @@ -39,37 +94,33 @@ export class AppComponent implements OnInit { { label: 'Entities', icon: 'fa-search', items: [ #foreach($entity in $project.withoutManyToManyJoinEntities.list) - { - label: '${entity.model.type}', - items: [ - {label: 'Search', routerLink: ['/${entity.model.var}-list']}, - {label: 'Create', routerLink: ['/${entity.model.var}/new']} - ] - }#if($velocityHasNext), + {label: '${entity.model.type} Search', routerLink: ['/${entity.model.var}-list']}, + {label: '${entity.model.type} Create', routerLink: ['/${entity.model.var}/new']}#if($velocityHasNext), #end #end ] }, - { label: 'Swagger', url : '/swagger-ui.html', icon: 'fa-gear' }, + { label: 'Swagger', url : "/swagger-ui.html", icon: 'fa-gear' }, { label: 'Documentation', icon: 'fa-book', items: [ - {label: 'Source code', icon: 'fa-github-alt', url: 'https://github.com/jaxio/celerio-angular-quickstart'}, - {label: 'Celerio Documentation', icon: 'fa-external-link', url: 'http://www.jaxio.com/documentation/celerio/'}, - {label: 'Angular Cli', icon: 'fa-external-link', url: 'https://cli.angular.io/'}, - {label: 'Angular 5', icon: 'fa-external-link', url: 'https://angular.io/'}, - {label: 'Material 5', icon: 'fa-external-link', url: 'https://material.angular.io/'}, - {label: 'PrimeNG Showcase', icon: 'fa-external-link', url: 'http://www.primefaces.org/primeng'}, - {label: 'TypeScript', icon: 'fa-external-link', url: 'https://www.typescriptlang.org/'}, - {label: 'Spring Boot', icon: 'fa-external-link', url: 'http://projects.spring.io/spring-boot/'}, - {label: 'Spring Data JPA', icon: 'fa-external-link', url: 'http://projects.spring.io/spring-data-jpa/'} + {label: "Source code", icon: 'fa-github-alt', url: "https://github.com/jaxio/celerio-angular-quickstart"}, + {label: "Celerio Documentation", icon: 'fa-external-link', url: "http://www.jaxio.com/documentation/celerio/"}, + {label: "Angular Cli", icon: 'fa-external-link', url: "https://cli.angular.io/"}, + {label: "Angular 5", icon: 'fa-external-link', url: "https://angular.io/"}, + {label: "Material 5", icon: 'fa-external-link', url: "https://material.angular.io/"}, + {label: "PrimeNG Showcase", icon: 'fa-external-link', url: "http://www.primefaces.org/primeng"}, + {label: "TypeScript", icon: 'fa-external-link', url: "https://www.typescriptlang.org/"}, + {label: "Spring Boot", icon: 'fa-external-link', url: "http://projects.spring.io/spring-boot/"}, + {label: "Spring Data JPA", icon: 'fa-external-link', url: "http://projects.spring.io/spring-data-jpa/"} ] } ]; this.authService.isAuthenticated(). subscribe( - resp => { + resp => + { this.authenticated = resp; this.displayLoginDialog = !this.authenticated; if (this.authenticated) { diff --git a/pack-angular/celerio/pack-angular/web/src/app/app.module.ts.p.vm b/pack-angular/celerio/pack-angular/web/src/app/app.module.ts.p.vm index 847a734..e0d0962 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/app.module.ts.p.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/app.module.ts.p.vm @@ -4,15 +4,15 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations' import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; -import { MatDatepickerModule, MatNativeDateModule, MatDialogModule, MatCardModule, MatIconModule, MatSelectModule, - MatTabsModule, MatInputModule, MatButtonModule } from '@angular/material'; +import { RouterModule } from '@angular/router'; +import { MatDatepickerModule, MatNativeDateModule, MatDialogModule, MatCardModule, MatIconModule, MatSelectModule, MatTabsModule, MatInputModule, MatButtonModule } from '@angular/material'; import { ConfirmDialogModule, FileUploadModule, PanelModule, GrowlModule, MenubarModule, DialogModule, ButtonModule, AutoCompleteModule, DataTableModule, SharedModule, DropdownModule,PickListModule,CheckboxModule,TriStateCheckboxModule, InputTextModule,InputTextareaModule,CalendarModule,PasswordModule,TabViewModule } from 'primeng/primeng'; import { ConfirmationService } from 'primeng/primeng'; -import { AppComponent } from './app.component'; -import { HomeComponent } from './home.component'; +import { AppComponent } from './app.component'; +import { HomeComponent } from './home.component'; import { AuthService } from './service/auth.service'; import { MessageService } from './service/message.service'; -import { routing } from './app.routes'; +import { routing } from './app.routes'; import { EmailValidator } from './support/email.validator'; import { ConfirmDeleteDialogComponent } from './support/confirm-delete-dialog.component'; @@ -22,6 +22,7 @@ import { ConfirmDeleteDialogComponent } from './support/confirm-delete-dialog.co import { ${entity.service.type} } from './entities/$entity.model.var/${entity.model.var}.service'; import { ${entity.model.type}ListComponent } from './entities/$entity.model.var/${entity.model.var}-list.component'; import { ${entity.model.type}DetailComponent } from './entities/$entity.model.var/${entity.model.var}-detail.component'; +import { ${entity.model.type}LineComponent } from './entities/$entity.model.var/${entity.model.var}-line.component'; import { ${entity.model.type}CompleteComponent } from './entities/$entity.model.var/${entity.model.var}-auto-complete.component'; #end @@ -30,12 +31,13 @@ import { ${entity.model.type}CompleteComponent } from './entities/$entity.model. AppComponent, HomeComponent, EmailValidator, - ConfirmDeleteDialogComponent, + ConfirmDeleteDialogComponent #foreach($entity in $project.withoutManyToManyJoinEntities.list) - + , ${entity.model.type}ListComponent, ${entity.model.type}DetailComponent, - ${entity.model.type}CompleteComponent, + ${entity.model.type}LineComponent, + ${entity.model.type}CompleteComponent #end ], imports: [ diff --git a/pack-angular/celerio/pack-angular/web/src/app/app.routes.ts.p.vm b/pack-angular/celerio/pack-angular/web/src/app/app.routes.ts.p.vm index b4d0a87..b540ca1 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/app.routes.ts.p.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/app.routes.ts.p.vm @@ -1,5 +1,5 @@ $output.file("web/src/app/app.routes.ts")## -import { ModuleWithProviders } from '@angular/core'; +import { ModuleWithProviders } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './home.component'; @@ -10,11 +10,11 @@ import { ${entity.model.type}DetailComponent } from './entities/$entity.model.va #end export const routes: Routes = [ - {path : '', component: HomeComponent }, + { path : '', component: HomeComponent } #foreach($entity in $project.withoutManyToManyJoinEntities.list) - - {path: '${entity.model.var}-list', component: ${entity.model.type}ListComponent }, - {path: '${entity.model.var}/:id', component: ${entity.model.type}DetailComponent }, + , + {path: '${entity.model.var}-list', component: ${entity.model.type}ListComponent }, + {path: '${entity.model.var}/:id', component: ${entity.model.type}DetailComponent } #end ]; diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.html.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.html.e.vm deleted file mode 100644 index bd32721..0000000 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.html.e.vm +++ /dev/null @@ -1,6 +0,0 @@ -$output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}-auto-complete.component.html")## - - - #foreach($attr in $entity.printerAttributes.flatUp.list){{ ${entity.model.var}?.${attr.var} }} #end - - \ No newline at end of file diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.ts.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.ts.e.vm index 23512ce..b6c6ee6 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.ts.e.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-auto-complete.component.ts.e.vm @@ -1,6 +1,7 @@ $output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}-auto-complete.component.ts")## -import {Component, Input, forwardRef} from '@angular/core'; -import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms'; +import {Component, Input, Output, EventEmitter, forwardRef} from '@angular/core'; +import {ControlValueAccessor, NG_VALUE_ACCESSOR} from "@angular/forms"; +import {AutoCompleteModule} from 'primeng/primeng'; import {MessageService} from '../../service/message.service'; import {${entity.model.type}} from './${entity.model.var}'; import {${entity.service.type}} from './${entity.model.var}.service'; @@ -14,63 +15,69 @@ export const ${entity.model.type.toUpperCase()}_AUTO_COMPLETE_CONTROL_VALUE_ACCE }; @Component({ - templateUrl: '${entity.model.var}-auto-complete.component.html', - selector: 'app-${entity.model.var}-auto-complete', - providers: [${entity.model.type.toUpperCase()}_AUTO_COMPLETE_CONTROL_VALUE_ACCESSOR] + template: ` + + + <${entity.model.var}-line [$entity.model.var]="$entity.model.var"> + + + `, + selector: '${entity.model.var}-auto-complete', + providers: [${entity.model.type.toUpperCase()}_AUTO_COMPLETE_CONTROL_VALUE_ACCESSOR] }) export class ${entity.model.type}CompleteComponent implements ControlValueAccessor { - @Input() disabled = false; - @Input() id: string; - @Input() name: string; + @Input() disabled : boolean = false; + @Input() id : string; + @Input() name : string; - // The internal data model + //The internal data model private _value: $entity.model.type = null; - public suggestions: ${entity.model.type}[] = []; + public suggestions : ${entity.model.type}[] = []; - // Placeholders for the callbacks + //Placeholders for the callbacks private _onTouchedCallback: () => void = () => {}; - private _onChangeCallback: (_: any) => void = () => {}; + private _onChangeCallback: (_:any) => void = () => {}; - constructor(private $entity.service.var: ${entity.service.type}, private messageService: MessageService) { + constructor(private $entity.service.var : ${entity.service.type}, private messageService : MessageService) { } @Input() - get value(): any { return this._value; } + get value(): any { return this._value; }; - // set accessor including call the onchange callback + //set accessor including call the onchange callback set value(v: any) { - if (this._value != null && !v) { + if (this._value != null && (v == null || v == "")) { this.select(null); } // nop, see writeValue and select method } - // Set touched on blur - onTouched() { + //Set touched on blur + onTouched(){ this._onTouchedCallback(); } - // From ControlValueAccessor interface + //From ControlValueAccessor interface writeValue(value: any) { this._value = <$entity.model.type> value; } - // From ControlValueAccessor interface + //From ControlValueAccessor interface registerOnChange(fn: any) { this._onChangeCallback = fn; } - // From ControlValueAccessor interface + //From ControlValueAccessor interface registerOnTouched(fn: any) { this._onTouchedCallback = fn; } - // From ControlValueAccessor interface + //From ControlValueAccessor interface setDisabledState(isDisabled: boolean) { } - complete(event: any) { + complete(event:any) { this.${entity.service.var}.complete(event.query). subscribe( results => this.suggestions = results, @@ -78,7 +85,7 @@ export class ${entity.model.type}CompleteComponent implements ControlValueAccess ); } - select(v: any) { + select(v : any) { this._value = v; this._onChangeCallback(v); } diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.html.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.html.e.vm index bfae38f..94f7bf6 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.html.e.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.html.e.vm @@ -5,7 +5,7 @@ $output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}-detai
- + <${relation.toEntity.model.var}-auto-complete [(ngModel)]="${entity.model.var}.${relation.to.var}" id="${relation.to.var}" name="${relation.to.var}" [disabled]="sub">
diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.ts.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.ts.e.vm index c4fb821..bd4fd0d 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.ts.e.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-detail.component.ts.e.vm @@ -1,7 +1,8 @@ $output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}-detail.component.ts")## import {Component, OnInit, OnDestroy, Input, Output, EventEmitter} from '@angular/core'; -import {Router, ActivatedRoute} from '@angular/router'; -import {MessageService} from '../../service/message.service'; +import { Router, ActivatedRoute } from '@angular/router'; +import { SelectItem } from 'primeng/primeng'; +import { MessageService} from '../../service/message.service'; import {${entity.model.type}} from './${entity.model.var}'; import {${entity.service.type}} from './${entity.model.var}.service'; #set($imports = []) @@ -20,25 +21,26 @@ import {${relation.toEntity.service.type}} from '../$relation.toEntity.model.var #end @Component({ - templateUrl: '${entity.model.var}-detail.component.html', - // selector: '${entity.model.var}-detail', + moduleId: module.id, + templateUrl: '${entity.model.var}-detail.component.html', + selector: '${entity.model.var}-detail', }) export class ${entity.model.type}DetailComponent implements OnInit, OnDestroy { - $entity.model.var: $entity.model.type; + $entity.model.var : $entity.model.type; private params_subscription: any; #foreach ($relation in $entity.oneToMany.flatUp.list) - show$relation.to.varsUp = true; + show$relation.to.varsUp : boolean = true; #end #foreach ($relation in $entity.manyToMany.list) - source$relation.to.varsUp: ${relation.toEntity.model.type}[] = []; + source$relation.to.varsUp : ${relation.toEntity.model.type}[] = []; #end - @Input() sub = false; + @Input() sub : boolean = false; #foreach ($relation in $entity.forwardXToOne.list) @Input() // used to pass the parent when creating a new $entity.model.type - set ${relation.to.var}($relation.to.var: $relation.to.type) { + set ${relation.to.var}($relation.to.var : $relation.to.type) { this.$entity.model.var = new ${entity.model.type}(); this.${entity.model.var}.$relation.to.var = $relation.to.var; #if($relation.fromAttribute.isInCpk()) @@ -48,18 +50,17 @@ export class ${entity.model.type}DetailComponent implements OnInit, OnDestroy { } #end - @Output() saveClicked = new EventEmitter<$entity.model.type>(); - @Output() cancelClicked = new EventEmitter(); + @Output() onSaveClicked = new EventEmitter<$entity.model.type>(); + @Output() onCancelClicked = new EventEmitter(); #foreach($attr in $entity.enumAttributes.list) ${attr.var}Options: SelectItem[]; #end - constructor(private route: ActivatedRoute, private router: Router, private messageService: MessageService, - private ${entity.service.var}: ${entity.service.type}#foreach ($relation in $entity.manyToMany.list), private ${relation.toEntity.service.var}: ${relation.toEntity.service.type}#end) { + constructor(private route: ActivatedRoute, private router: Router, private messageService: MessageService, private ${entity.service.var}: ${entity.service.type}#foreach ($relation in $entity.manyToMany.list), private ${relation.toEntity.service.var} : ${relation.toEntity.service.type}#end) { #foreach($attr in $entity.enumAttributes.list) this.${attr.var}Options = []; #foreach($enumValue in $attr.enumConfig.enumValues) - this.${attr.var}Options.push({label: '$enumValue.labels().label', value: '$enumValue.name'}); + this.${attr.var}Options.push({"label": "$enumValue.labels().label", 'value': "$enumValue.name"}); #end #end #foreach ($relation in $entity.manyToMany.list) @@ -75,7 +76,7 @@ export class ${entity.model.type}DetailComponent implements OnInit, OnDestroy { } this.params_subscription = this.route.params.subscribe(params => { - const id = params['id']; + let id = params['id']; console.log('ngOnInit for ${entity.model.var}-detail ' + id); if (id === 'new') { @@ -129,10 +130,10 @@ export class ${entity.model.type}DetailComponent implements OnInit, OnDestroy { $entity.model.var => { this.$entity.model.var = $entity.model.var; if (this.sub) { - this.saveClicked.emit(this.$entity.model.var); - this.messageService.info('Saved OK and msg emitted', 'Angular Rocks!'); + this.onSaveClicked.emit(this.$entity.model.var); + this.messageService.info('Saved OK and msg emitted', 'Angular Rocks!') } else { - this.messageService.info('Saved OK', 'Angular Rocks!'); + this.messageService.info('Saved OK', 'Angular Rocks!') } }, error => this.messageService.error('Could not save', error) @@ -141,8 +142,8 @@ export class ${entity.model.type}DetailComponent implements OnInit, OnDestroy { onCancel() { if (this.sub) { - this.cancelClicked.emit('cancel'); - this.messageService.info('Cancel clicked and msg emitted', 'Angular Rocks!'); + this.onCancelClicked.emit("cancel"); + this.messageService.info('Cancel clicked and msg emitted', 'Angular Rocks!') } } diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-line.component.ts.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-line.component.ts.e.vm new file mode 100644 index 0000000..e098937 --- /dev/null +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-line.component.ts.e.vm @@ -0,0 +1,13 @@ +$output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}-line.component.ts")## +import {Component, Input} from '@angular/core'; +import {${entity.model.type}} from './${entity.model.var}'; + +@Component({ + template: ` + #foreach($attr in $entity.printerAttributes.flatUp.list){{ ${entity.model.var}?.${attr.var} }} #end + `, + selector: '${entity.model.var}-line', +}) +export class ${entity.model.type}LineComponent { + @Input() $entity.model.var : $entity.model.type; +} diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.html.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.html.e.vm index e4e8811..a59344c 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.html.e.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.html.e.vm @@ -6,7 +6,7 @@ $output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}-list.
- + <${relation.toEntity.model.var}-auto-complete [(ngModel)]="example.${relation.to.var}" id="${relation.to.var}" name="${relation.to.var}">
#end diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.ts.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.ts.e.vm index 10d02dd..04d2c9a 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.ts.e.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity-list.component.ts.e.vm @@ -2,11 +2,12 @@ $output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}-list. import { Component, Input, Output, OnChanges, EventEmitter, SimpleChanges} from '@angular/core'; import { Router } from '@angular/router'; import { DataTable, LazyLoadEvent } from 'primeng/primeng'; -import { PageResponse } from '../../support/paging'; +import { PageResponse } from "../../support/paging"; import { MessageService } from '../../service/message.service'; import { MatDialog } from '@angular/material'; -import { ConfirmDeleteDialogComponent } from '../../support/confirm-delete-dialog.component'; +import { ConfirmDeleteDialogComponent } from "../../support/confirm-delete-dialog.component"; import { $entity.model.type } from './${entity.model.var}'; +import { ${entity.model.type}DetailComponent } from './${entity.model.var}-detail.component'; import { $entity.service.type } from './${entity.model.var}.service'; #set($imports = []) #foreach ($relation in $entity.xToOne.list) @@ -14,33 +15,35 @@ import { $entity.service.type } from './${entity.model.var}.service'; #if(!$relation.to.type.equals($entity.model.type)) import { $relation.to.type } from '../$relation.toEntity.model.var/$relation.toEntity.model.var'; #end +import { ${relation.to.type}LineComponent } from '../$relation.toEntity.model.var/${relation.toEntity.model.var}-line.component'; #set($temp = $imports.add($relation.to.type)) #end #end @Component({ - templateUrl: '${entity.model.var}-list.component.html', - // selector: '${entity.model.var}-list' + moduleId: module.id, + templateUrl: '${entity.model.var}-list.component.html', + selector: '${entity.model.var}-list' }) -export class ${entity.model.type}ListComponent implements OnChanges { +export class ${entity.model.type}ListComponent { - @Input() header = '${entity.model.varsUp}...'; + @Input() header = "${entity.model.varsUp}..."; // When 'sub' is true, it means this list is used as a one-to-many list. // It belongs to a parent entity, as a result the addNew operation // must prefill the parent entity. The prefill is not done here, instead we // emit an event. // When 'sub' is false, we display basic search criterias - @Input() sub: boolean; - @Output() addNewClicked = new EventEmitter(); + @Input() sub : boolean; + @Output() onAddNewClicked = new EventEmitter(); - ${entity.model.var}ToDelete: $entity.model.type; + ${entity.model.var}ToDelete : $entity.model.type; // basic search criterias (visible if not in 'sub' mode) - example: $entity.model.type = new ${entity.model.type}(); + example : $entity.model.type = new ${entity.model.type}(); // list is paginated - currentPage: PageResponse<$entity.model.type> = new PageResponse<$entity.model.type>(0, 0, []); + currentPage : PageResponse<$entity.model.type> = new PageResponse<$entity.model.type>(0,0,[]); ## --------------- Many to One #foreach ($relation in $entity.forwardXToOne.list) @@ -48,12 +51,12 @@ export class ${entity.model.type}ListComponent implements OnChanges { // X to one: input param is used to filter the list when displayed // as a one-to-many list by the other side. #end - private _$relation.to.var: $relation.to.type; + private _$relation.to.var : $relation.to.type; #end - constructor(private router: Router, - private $entity.service.var: $entity.service.type, - private messageService: MessageService, + constructor(private router : Router, + private $entity.service.var : $entity.service.type, + private messageService : MessageService, private confirmDeleteDialog: MatDialog) { } @@ -68,18 +71,17 @@ export class ${entity.model.type}ListComponent implements OnChanges { /** * Invoked when user presses the search button. */ - search(dt: DataTable) { + search(dt : DataTable) { if (!this.sub) { dt.reset(); - this.loadPage({ first: 0, rows: dt.rows, sortField: dt.sortField, sortOrder: dt.sortOrder, - filters: null, multiSortMeta: dt.multiSortMeta }); + this.loadPage({ first: 0, rows: dt.rows, sortField: dt.sortField, sortOrder: dt.sortOrder, filters: null, multiSortMeta: dt.multiSortMeta }); } } /** * Invoked automatically by primeng datatable. */ - loadPage(event: LazyLoadEvent) { + loadPage(event : LazyLoadEvent) { this.${entity.service.var}.getPage(this.example, event). subscribe( pageResponse => this.currentPage = pageResponse, @@ -94,7 +96,7 @@ export class ${entity.model.type}ListComponent implements OnChanges { // as a one-to-many list by the other side. #end @Input() - set ${relation.to.var}($relation.to.var: $relation.to.type) { + set ${relation.to.var}($relation.to.var : $relation.to.type) { if ($relation.to.var == null) { return; } @@ -107,29 +109,29 @@ export class ${entity.model.type}ListComponent implements OnChanges { #end - onRowSelect(event: any) { + onRowSelect(event : any) { #if($entity.hasCompositePk()) - const id = #foreach($a in $primaryKey.attributes)event.data.${identifiableProperty.var}.${a.var}#{if}($a.isDate()).toISOString().substring(0,19)#{end}#{if}($velocityHasNext) + '_' + #{else};#{end} + let id = #foreach($a in $primaryKey.attributes)event.data.${identifiableProperty.var}.${a.var}#{if}($a.isDate()).toISOString().substring(0,19)#{end}#{if}($velocityHasNext) + '_' + #{else};#{end} #{end} #else - const id = event.data.${identifiableProperty.var}; + let id = event.data.${identifiableProperty.var}; #end this.router.navigate(['/${entity.model.var}', id]); } addNew() { if (this.sub) { - this.addNewClicked.emit('addNew'); + this.onAddNewClicked.emit("addNew"); } else { this.router.navigate(['/${entity.model.var}', 'new']); } } - showDeleteDialog(rowData: any) { - const ${entity.model.var}ToDelete: $entity.model.type = <$entity.model.type> rowData; + showDeleteDialog(rowData : any) { + let ${entity.model.var}ToDelete : $entity.model.type = <$entity.model.type> rowData; - const dialogRef = this.confirmDeleteDialog.open(ConfirmDeleteDialogComponent); + let dialogRef = this.confirmDeleteDialog.open(ConfirmDeleteDialogComponent); dialogRef.afterClosed().subscribe(result => { if (result === 'delete') { this.delete(${entity.model.var}ToDelete); @@ -137,12 +139,12 @@ export class ${entity.model.type}ListComponent implements OnChanges { }); } - private delete(${entity.model.var}ToDelete: $entity.model.type) { + private delete(${entity.model.var}ToDelete : $entity.model.type) { #if($entity.hasCompositePk()) - const id = #foreach($a in $primaryKey.attributes)${entity.model.var}ToDelete.${identifiableProperty.var}.${a.var}#{if}($a.isDate()).toISOString().substring(0,19)#{end}#{if}($velocityHasNext) + '_' + #{else};#{end}#{end} + let id = #foreach($a in $primaryKey.attributes)${entity.model.var}ToDelete.${identifiableProperty.var}.${a.var}#{if}($a.isDate()).toISOString().substring(0,19)#{end}#{if}($velocityHasNext) + '_' + #{else};#{end}#{end} #else - const id = ${entity.model.var}ToDelete.${identifiableProperty.var}; + let id = ${entity.model.var}ToDelete.${identifiableProperty.var}; #end this.${entity.service.var}.delete(id). @@ -154,4 +156,4 @@ export class ${entity.model.type}ListComponent implements OnChanges { error => this.messageService.error('Could not delete!', error) ); } -} +} \ No newline at end of file diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity.service.ts.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity.service.ts.e.vm index a8b55ff..1d841a8 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity.service.ts.e.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity.service.ts.e.vm @@ -1,38 +1,40 @@ $output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}.service.ts")## import { Injectable } from '@angular/core'; -import { HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { HttpClient, HttpResponse, HttpErrorResponse } from '@angular/common/http'; import { LazyLoadEvent } from 'primeng/primeng'; import { MessageService } from '../../service/message.service'; import { PageResponse, PageRequestByExample } from '../../support/paging'; import { ${entity.model.type} } from './${entity.model.var}'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs/Rx'; import { catchError, map } from 'rxjs/operators'; import 'rxjs/add/observable/throw'; @Injectable() export class ${entity.service.type} { - constructor(private http: HttpClient) {} + constructor(private http: HttpClient, private messageService : MessageService) {} /** * Get a $entity.model.type by id. */ - ${entity.model.getter}(id: any): Observable<$entity.model.type> { + ${entity.model.getter}(id : any) : Observable<$entity.model.type> { return this.http.get('/api/${entity.model.vars}/' + id) .pipe( map(response => new ${entity.model.type}(response)), - catchError(MessageService.handleError) + catchError(this.handleError) ); } /** * Update the passed ${entity.model.var}. */ - update($entity.model.var: $entity.model.type): Observable<$entity.model.type> { - return this.http.put('/api/$entity.model.vars/', $entity.model.var) + update($entity.model.var : $entity.model.type) : Observable<$entity.model.type> { + let body = $entity.model.var; + + return this.http.put('/api/$entity.model.vars/', body) .pipe( map(response => new ${entity.model.type}(response)), - catchError(MessageService.handleError) + catchError(this.handleError) ); } @@ -40,13 +42,14 @@ export class ${entity.service.type} { * Load a page (for paginated datatable) of $entity.model.type using the passed * $entity.model.var as an example for the search by example facility. */ - getPage($entity.model.var: $entity.model.type, event: LazyLoadEvent): Observable> { - const body = new PageRequestByExample($entity.model.var, event); + getPage($entity.model.var : $entity.model.type, event : LazyLoadEvent) : Observable> { + let req = new PageRequestByExample($entity.model.var, event); + let body = req; return this.http.post>('/api/$entity.model.vars/page', body) .pipe( map(pr => new PageResponse<$entity.model.type>(pr.totalPages, pr.totalElements, ${entity.model.type}.toArray(pr.content))), - catchError(MessageService.handleError) + catchError(this.handleError) ); } @@ -54,21 +57,31 @@ export class ${entity.service.type} { * Performs a search by example on 1 attribute (defined on server side) and returns at most 10 results. * Used by ${entity.model.type}CompleteComponent. */ - complete(query: string): Observable<${entity.model.type}[]> { - const body = {query: query, maxResults: 10}; + complete(query : string) : Observable<${entity.model.type}[]> { + let body = {'query': query, 'maxResults': 10}; return this.http.post('/api/$entity.model.vars/complete', body) .pipe( map(response => ${entity.model.type}.toArray(response)), - catchError(MessageService.handleError) + catchError(this.handleError) ); } /** * Delete an $entity.model.type by id. */ - delete(id: any) { + delete(id : any) { return this.http.delete('/api/${entity.model.vars}/' + id) - .pipe(catchError(MessageService.handleError)); + .pipe(catchError(this.handleError)); } + // sample method from angular doc + private handleError (error: HttpErrorResponse) { + // TODO: seems we cannot use messageService from here... + let errMsg = (error.message) ? error.message : 'Server error'; + console.error(errMsg); + if (error.status === 401 ) { + window.location.href = '/'; + } + return Observable.throw(errMsg); + } } diff --git a/pack-angular/celerio/pack-angular/web/src/app/entities/entity.ts.e.vm b/pack-angular/celerio/pack-angular/web/src/app/entities/entity.ts.e.vm index e2b41e8..7965835 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/entities/entity.ts.e.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/entities/entity.ts.e.vm @@ -1,6 +1,6 @@ $output.file("web/src/app/entities/${entity.model.var}/${entity.model.var}.ts")## #macro(tstype $attr) -#if($attr.isString()): string#elseif($attr.isNumeric()): number#elseif($attr.isBoolean()): boolean#elseif($attr.isDate()): Date#end +#if($attr.isString()) : string#elseif($attr.isNumeric()) : number#elseif($attr.isBoolean()) : boolean#elseif($attr.isDate()) : Date#end #end ## --------------- Composite PK #if($entity.hasCompositePk()) @@ -32,7 +32,7 @@ import {${relation.to.type}} from '../${relation.toEntity.model.var}/${relation. export class $entity.model.type { ## --------------- Compiste PK #if ($entity.hasCompositePk()) - ${identifiableProperty.var}: $entity.primaryKey.type = new ${entity.primaryKey.type}(); + ${identifiableProperty.var} : $entity.primaryKey.type = new ${entity.primaryKey.type}(); #end ## --------------- Raw attributes (except the one involved in XtoOneRelation) #foreach ($attribute in $entity.nonCpkAttributes.list) @@ -48,18 +48,18 @@ export class $entity.model.type { #if ($velocityCount == 1) // x-to-one #end - $relation.to.var: $relation.to.type; + $relation.to.var : $relation.to.type; #end ## --------------- many to many #foreach ($relation in $entity.manyToMany.list) #if ($velocityCount == 1) // many-to-many #end - $relation.to.vars: ${relation.to.type}[]; + $relation.to.vars : ${relation.to.type}[]; #end - constructor(json?: any) { + constructor(json? : any) { if (json != null) { ## --------------- Composite PK #if ($entity.hasCompositePk()) @@ -96,7 +96,13 @@ export class $entity.model.type { // Utils - static toArray(jsons: any[]): ${entity.model.type}[] { - return jsons ? jsons.map(json => new ${entity.model.type}(json)) : []; + static toArray(jsons : any[]) : ${entity.model.type}[] { + let $entity.model.vars : ${entity.model.type}[] = []; + if (jsons != null) { + for (let json of jsons) { + ${entity.model.vars}.push(new ${entity.model.type}(json)); + } + } + return $entity.model.vars; } } diff --git a/pack-angular/celerio/pack-angular/web/src/app/home.component.ts.p.vm b/pack-angular/celerio/pack-angular/web/src/app/home.component.ts.p.vm index ba64511..05726d6 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/home.component.ts.p.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/home.component.ts.p.vm @@ -2,6 +2,7 @@ $output.file("web/src/app/home.component.ts")## import { Component } from '@angular/core'; @Component({ + moduleId: module.id, templateUrl: 'home.component.html', styles: [` h1 {color: blue;} diff --git a/pack-angular/celerio/pack-angular/web/src/app/service/auth.service.ts.p.vm b/pack-angular/celerio/pack-angular/web/src/app/service/auth.service.ts.p.vm index 03228a4..ad37c63 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/service/auth.service.ts.p.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/service/auth.service.ts.p.vm @@ -1,50 +1,53 @@ $output.file("web/src/app/service/auth.service.ts")## -import {Injectable} from '@angular/core'; -import {HttpParams, HttpClient, HttpErrorResponse} from '@angular/common/http'; -import {Observable} from 'rxjs/Observable'; -import {catchError, map} from 'rxjs/operators'; +import { Injectable } from '@angular/core' +import { HttpParams, HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { Observable } from 'rxjs/Rx'; +import { catchError, map } from 'rxjs/operators'; import 'rxjs/add/observable/throw'; @Injectable() export class AuthService { - constructor(private http: HttpClient) { - } + constructor(private http: HttpClient) {} - isAuthenticated(): Observable { - return this.http.get('/api/authenticated') - .pipe(catchError(this.handleError)); - } - - login(j_username: string, j_password: string): Observable { - console.log('login for ' + j_username); - const params = { - j_username: j_username, - j_password: j_password, - submit: 'Login' - }; - - const body = new HttpParams({fromObject: params}); + isAuthenticated() : Observable { + return this.http.get('/api/authenticated') + .pipe( + catchError(this.handleError) + ); + } - return this.http.post('/api/login', body, {observe: 'response'}) - .pipe( - map(res => res.status === 200), - catchError(this.handleError) - ); - } + login(j_username : string, j_password : string) : Observable { + console.log("login for " + j_username); + const params = { + j_username: j_username, + j_password: j_password, + submit: 'Login' + }; + + let body = new HttpParams({fromObject: params}); + + + return this.http.post('/api/login', body, { observe: 'response' }) + .pipe( + map(res => res.status == 200), + catchError(this.handleError) + ); + } - private handleError(err: HttpErrorResponse) { - let errMsg: string; - if (err.error instanceof Error) { - // A client-side or network error occurred. Handle it accordingly. - errMsg = 'An error occurred:' + err.error.message; - } else { - // The backend returned an unsuccessful response code. - // The response body may contain clues as to what went wrong, - errMsg = 'Backend returned code ' + err.status + ', body was: ' + err.error; + private handleError (err: HttpErrorResponse) { + if (err.error instanceof Error) { + // A client-side or network error occurred. Handle it accordingly. + let errMsg = `An error occurred: ${d}{err.error.message}`; + console.error(errMsg); + return Observable.throw(errMsg); + } else { + // The backend returned an unsuccessful response code. + // The response body may contain clues as to what went wrong, + let errMsg = `Backend returned code ${d}{err.status}, body was: ${d}{err.error}`; + console.error(errMsg); + return Observable.throw(errMsg); + } } - console.error(errMsg); - return Observable.throw(errMsg); - } } diff --git a/pack-angular/celerio/pack-angular/web/src/app/service/message.service.ts.p.vm b/pack-angular/celerio/pack-angular/web/src/app/service/message.service.ts.p.vm index 9536290..a5bdeac 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/service/message.service.ts.p.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/service/message.service.ts.p.vm @@ -1,35 +1,21 @@ -$output.file('web/src/app/service/message.service.ts')## -import {Injectable} from '@angular/core'; -import {Subject} from 'rxjs/Subject'; -import {Message} from 'primeng/primeng'; -import {HttpErrorResponse} from '@angular/common/http'; -import {Observable} from 'rxjs/Observable'; +$output.file("web/src/app/service/message.service.ts")## +import { Injectable } from '@angular/core' +import { Subject } from 'rxjs/Subject'; +import { Message } from 'primeng/primeng'; @Injectable() export class MessageService { - private messageSource = new Subject(); + private messageSource = new Subject(); - messageSource$ = this.messageSource.asObservable(); + messageSource${d} = this.messageSource.asObservable(); - // sample method from angular doc - static handleError(error: HttpErrorResponse) { - // TODO: seems we cannot use messageService from here... - const errMsg = error.message || 'Server error'; - console.error(errMsg); - if (error.status === 401) { - location.href = '/'; + info(summary : string, detail : string) { + this.messageSource.next({severity:'info', summary: summary, detail: detail}); + console.log("INFO: " + summary + " DETAIL: " + detail); } - return Observable.throw(errMsg); - } - info(summary: string, detail: string) { - this.messageSource.next({severity: 'info', summary: summary, detail: detail}); - console.log('INFO: ' + summary + ' DETAIL: ' + detail); - } - - error(summary: string, detail: string) { - this.messageSource.next({severity: 'error', summary: summary, detail: detail}); - console.log('ERROR: ' + summary + ' DETAIL: ' + detail); - } - -} + error(summary : string, detail : string) { + this.messageSource.next({severity:'error', summary: summary, detail: detail}); + console.log("ERROR: " + summary + " DETAIL: " + detail); + } +} \ No newline at end of file diff --git a/pack-angular/celerio/pack-angular/web/src/app/support/confirm-delete-dialog.component.ts b/pack-angular/celerio/pack-angular/web/src/app/support/confirm-delete-dialog.component.ts index bedd248..c260bc8 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/support/confirm-delete-dialog.component.ts +++ b/pack-angular/celerio/pack-angular/web/src/app/support/confirm-delete-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Inject } from '@angular/core'; -import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material'; +import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material'; @Component({ selector: 'app-confirm-delete-dialog', diff --git a/pack-angular/celerio/pack-angular/web/src/app/support/paging.ts.p.vm b/pack-angular/celerio/pack-angular/web/src/app/support/paging.ts.p.vm index 3728f98..70bf349 100644 --- a/pack-angular/celerio/pack-angular/web/src/app/support/paging.ts.p.vm +++ b/pack-angular/celerio/pack-angular/web/src/app/support/paging.ts.p.vm @@ -2,19 +2,19 @@ $output.file("web/src/app/support/paging.ts")## import {LazyLoadEvent} from 'primeng/primeng'; export class PageResponse { - constructor(public totalPages: number, - public totalElements: number, - public content: E[]) { } + constructor(public totalPages : number, + public totalElements : number, + public content : E[]) { } // remove the passed element from the content array. - remove(element: E) { - const indexToRemove: number = this.content.indexOf(element); - this.content = this.content.filter((val, i) => i !== indexToRemove); - this.totalElements--; + remove(element : E) { + let indexToRemove : number = this.content.indexOf(element); + this.content = this.content.filter((val,i) => i!=indexToRemove); + this.totalElements = this.totalElements - 1; } } export class PageRequestByExample { - constructor(public example: E, - public lazyLoadEvent: LazyLoadEvent) { } + constructor(public example : E, + public lazyLoadEvent : LazyLoadEvent) { } } diff --git a/pack-angular/celerio/pack-angular/web/src/styles.css b/pack-angular/celerio/pack-angular/web/src/styles.css index b1438fd..35d6a8a 100644 --- a/pack-angular/celerio/pack-angular/web/src/styles.css +++ b/pack-angular/celerio/pack-angular/web/src/styles.css @@ -1,7 +1,7 @@ /* You can add global styles to this file, and also import other style files */ @import '~@angular/material/prebuilt-themes/deeppurple-amber.css'; -@import 'https://fonts.googleapis.com/icon?family=Material+Icons'; +@import '~https://fonts.googleapis.com/icon?family=Material+Icons'; @import '~primeng/resources/themes/omega/theme.css'; @import '~primeng/resources/primeng.min.css'; @@ -20,7 +20,10 @@ button.ui-button.ui-state-default { } .ui-button-icon-only .ui-button-text { - padding: 0; + padding-top: 0em; + padding-right: 0em; + padding-bottom: 0em; + padding-left: 0em; } diff --git a/quickstart/README.md b/quickstart/README.md index 6f05178..b034d86 100644 --- a/quickstart/README.md +++ b/quickstart/README.md @@ -3,7 +3,7 @@ * [Java Development Kit 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) * [Maven 3.5.x](https://maven.apache.org/download.cgi) -* [Angular cli 1.7.x ](https://github.com/angular/angular-cli#installation) +* [Angular cli 1.6.3 ](https://github.com/angular/angular-cli#installation) * [Npm 5.x.x](https://nodejs.org/en/) * [NodeJS 8.x](https://nodejs.org/en/) diff --git a/quickstart/pom.xml b/quickstart/pom.xml index d78c8d4..9c3f458 100644 --- a/quickstart/pom.xml +++ b/quickstart/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 1.5.10.RELEASE + 1.5.9.RELEASE @@ -149,21 +149,21 @@ - org.apache.commons - commons-lang3 - 3.7 + commons-lang + commons-lang + 2.6 io.springfox springfox-swagger2 - 2.8.0 + 2.7.0 io.springfox springfox-swagger-ui - 2.8.0 + 2.7.0