캐모마일 온라인 교육 동영상을 시청하고, c:\Chamomile\admin 하위에 admin 용 frontend 와 backend 코드가 있는 걸 알았습니다.
그래서 두 소스를 각각 cmd 창을 띄우고 백엔드는 mvn spring-boot:run 명령으로, 그리고 frontend 는 npm run local 명령으로 실행시켜서 동작은 확인했습니다.
사실 진행 중에 몇가지 안되는 부분은 에러 메시지나 기능을 살펴보고 자체적으로 fix 해서 실행시켰습니다.
- backend 실행 시에는 다음의 에러가 발생하였습니다.
[ERROR] COMPILATION ERROR :
[INFO] ————————————————————-
[ERROR] /C:/Chamomile/admin/chamomile-admin-project/src/test/java/net/lotte/chamomile/admin/mobile/appstore/api/AppstoreControllerTest.java:[20,54] package net.lotte.chamomile.module.mobile.admin.entity does not exist
이는 testCompile 단계를 skip 시켜서 성공했구요,
mvn install -Dmaven.test.skip
그리고 mvn spring-boot:run -Dmaven.test.skip 실행 시 에는,
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under ‘chmm.jdbc.password’ to java.lang.String:
Reason: java.lang.IllegalArgumentException: Could not resolve placeholder ‘jasypt.encryptor.password’ in value “${jasypt.encryptor.password}”
가 발생해서 이는 그냥 JasyptConfig.java 를 주석 처리하고, password 를 그냥 평문을 사용해서 실행을 성공했습니다.
여기서 질문은 : testCompile 단계의 실패, 그리고 Jasypt 에러를 피하기 위해서 어떤 설정이 필요한가요?
2. frontend 실행 시에는, npm run local 로 했을 때 별 문제 없이 UI 가 떳는데, 로그인 시 two factor 로그인이 활성화 되어 있어서
TWO_FACTOR=false 는 off 시키고 실행했습니다.
결국 여차저차 해서 admin 화면을 뛰우고 admin / 1111 로 로그인해서 결국 화면을 보긴 했습니다.
여기서 드리는 마지막 질문은,
이렇게 admin app 을 뛰우는게 맞는 걸까 라는 의문이 들고, 이렇게 admin app 관련해서 실행시키는 가이드는 어디에서 구할 수 있나요?
그리고 캐모마일 온라인 교육에 보면 다양한 archetype 을 선택해서 backend 를 구현하는 예제를 보여주던데요,
캐모마일은 admin-backend 와 업무-backend(신규 개발)와 frontend 는 admin 과 업무를 합쳐서 구성하는 건지 궁금합니다.
이는 캐모마일을 구성하는 배포 관점에서 질문이기도 합니다.
안녕하세요 SWA팀 이문혁입니다.
현재 아래 링크에 캐모마일 어드민 실행 가이드 작성을 추가하였습니다.
https://chamomile.lotteinnovate.com/new-guides/3.0.3/chamomile-admin-execute.html
추가로, admin 관련 오류를 수정하여 ide를 재배포하였습니다.
내용은 다음과 같습니다.
- chamomile-admin-project의 src/main/java/net/lotte/chamomile/admin/common/validation/ValidCollection.java를 삭제
- chamomile-admin-project의 pom.xml 파일을 다음과 같이 변경
<?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.lotte.chamomile.boot</groupId> <artifactId>chamomile-boot-starter-parent</artifactId> <version>3.0.3.0</version> <relativePath/> </parent> <groupId>net.lotte.chamomile.admin</groupId> <artifactId>chamomile-admin-project</artifactId> <properties> <argLine/> <main.basedir>${basedir}/..</main.basedir> </properties> <dependencies> <!--Spring Dependency--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> </exclusions> </dependency> <!--Chamomile Dependency--> <dependency> <groupId>net.lotte.chamomile</groupId> <artifactId>chamomile-core</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.boot</groupId> <artifactId>chamomile-boot-starter</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-security-jwt</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-database</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-database-audit</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-web</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-i18n</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-commoncode</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-menu</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-logging</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-notification</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-file</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-file-excel</artifactId> </dependency> <!-- cache --> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-cache</artifactId> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-mobile-admin</artifactId> </dependency> <dependency> <!-- 로깅 프레임워크 바인더 (프로바이더) --> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> <scope>compile</scope> </dependency> <!-- Jasypt properties 암호화 --> <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> </dependency> <!-- NOTE: JDBC Driver --> <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> </dependency> <!-- <dependency>--> <!-- <groupId>com.microsoft.sqlserver</groupId>--> <!-- <artifactId>mssql-jdbc</artifactId>--> <!-- <scope>runtime</scope>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>com.oracle.database.jdbc</groupId>--> <!-- <artifactId>ojdbc8</artifactId>--> <!-- </dependency>--> <!--Test Dependency--> <dependency> <groupId>net.lotte.chamomile</groupId> <artifactId>chamomile-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-user</artifactId> <scope>test</scope> </dependency> <!--ETC Dependency--> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>net.lotte.chamomile.module</groupId> <artifactId>chamomile-masking</artifactId> </dependency> </dependencies> </project>
감사합니다.
![](https://chamomile.lotteinnovate.com/storage/ap_avatars/9766527f2b5d3e95d4a733fcfb77bd7e.jpg)
안녕하세요, SWA팀 이문혁입니다.
- Admin Back-end 실행 시 모바일 Test Code동작까지 정상적으로 Success 되는것이 정상입니다.
문제 확인 후 조치하여 업데이트 진행하도록 하겠습니다. - 캐모마일에서는 또한 백엔드 어드민 실행 시 jasypt 라이브러리를 사용하여 민감정보를 암호화합니다.
따라서 백엔드 코드 실행 시 vmoption으로 -Djasypt.encryptor.password=<encryption-password> 를 추가하여 사용하는것이 권장되는 방법입니다. - 2FA 로그인 관련하여 사용하고 싶지 않은 경우 해당 옵션을 false 적용하여 실행하는것이 맞습니다.
- 캐모마일에서 권장하는 방법은 ChamomileAdmin(BO/FO) + ChamomileBusiness(업무FO/BO)로 각각 따로 구분하여 어드민에서 업무시스템을 제어하는 방법입니다. 다만 현재 어드민이 샘플코드 형태로 제공되고있기 때문에 서비스의 구성과 크기에 따라 커스터마이징하여 Admin과 업무시스템을 함께 구성하여 배포하실 수 있습니다.
어드민 활용가이드는 https://chamomile.lotteinnovate.com/new-guides/3.0.3/admin-sample.html
에서 확인하실 수 있습니다.
현재 어드민(fo)은 샘플코드에서 제공하는 readme파일이 설치 가이드입니다.
또한 어드인(bo)는 실행 및 설치관련 가이드를 추가하여 빠른 시일 내에 관련내용 업데이트 하도록 하겠습니다.
감사합니다.
와우 빠른 대응 감사합니다!