Closed rwellman-ats closed 1 year ago
p.s. For what it's worth, I wanted to mention that I like the concept of what this project is doing. Don't take my bug report or other comments as "negative"... just trying to make it better via the feedback process of using it for a real world project.
- When I go to the quartz-manager-ui/index.html, it forwards me to the login page. Why?
Hi @rwellman-ats, let me check. I will reply tomorrow.
This may be another issue for me to raise separately
Yes, I'm going to open another issue
For what it's worth, I wanted to mention that I like the concept of what this project is doing. Don't take my bug report or other comments as "negative"... just trying to make it better via the feedback process of using it for a real world project.
I really appreciate your bug reports. I believe into the feedback culture. This needs to improve this project.
I've tried with https://github.com/fabioformosa/quartz-manager-demo, commenting in the pom.xml
the dependency:
<!-- <dependency> -->
<!-- <groupId>it.fabioformosa.quartz-manager</groupId> -->
<!-- <artifactId>quartz-manager-starter-security</artifactId> -->
<!-- <version>3.0.1</version> -->
<!-- </dependency> -->
And accessing to http://localhost:8080/demo/quartz-manager-ui/
I don't get the login page.
Can you try?
Perhaps in your project you have spring security enabled, maybe? in that case, your custom security rules are applied to the quartz-manager-ui as well.
Well, I do not think it's "enabled". My base application is just a generic Quartz demo downloaded from the Baeldung web site/git repo (https://www.baeldung.com/) that uses Spring Boot / WebMVC. I have included my entire POM below, followed by my application .properties where you will see I even tried to disable the login form.
For what it's worth, the dependency hierarchy is only showing your JARs as dependent on the security api:
I probably don't have a lot of time until later this week to dig deeper. I will probably post the complete project to my github account where you can access it - it's really a very simple proof of concept app.
-------------- pom.xml ----------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<name>spring-quartz</name>
<description>Demo project for Scheduling in Spring with Quartz</description>
<artifactId>spring-quartz</artifactId>
<!-- <version>from parent pom</version> -->
<packaging>jar</packaging>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
</parent>
<properties>
<c3p0.version>0.9.5.2</c3p0.version>
<!--
<quartz.version>2.3.0</quartz.version>
-->
</properties>
<dependencies>
<!-- Added to support RestTemplate *and* provide a WebUI -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- A common feature of developing web applications is coding a change,
restarting your application, and refreshing the browser to view the change.
This entire process can eat up a lot of time. To speed up this refresh cycle,
Spring Boot offers with a handy module known as spring-boot-devtools.
Spring Boot Devtools:
* Enables hot swapping.
* Switches template engines to disable caching.
* Enables LiveReload to automatically refresh the browser.
* Other reasonable defaults based on development instead of production.
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- spring's support for quartz -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- Quartz -->
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</dependency>
<!-- QUARTZ-MANAGER -->
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-starter-api</artifactId>
<version>3.0.1</version>
</dependency>
<!-- QUARTZ-MANAGER :: OPTIONALLY -->
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-starter-ui</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>${c3p0.version}</version>
</dependency>
<!-- h2 in-memory database -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
-------------- application .properties ----------------
# This application...
using.spring.schedulerFactory=true
trigger.simple.freq.sec=180
# Spring WebMVC
server.port=9394
# server.servlet.context-path=/demo
# Spring Boot Actuator
management.endpoints.web.exposure.include=*
# Quartz
spring.quartz.job-store-type=jdbc
# Always create the Quartz database on startup
spring.quartz.jdbc.initialize-schema=always
# quartz-manager
quartz.enabled=false
quartz-manager.jobClass=org.baeldung.springquartz.basics.scheduler.SampleJobQuartzManager
job.frequency=4000
job.repeatCount=19
quartz-manager.account.pwd=rick
quartz-manager.security.login-model.form-login-enabled=false
quartz-manager.security.login-model.userpwd-filter-enabled=false
# Datasource shared with SCDF (Spring Cloud Data Flow)
spring.datasource.jdbc-url=jdbc:h2:mem:spring-quartz;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
# Logging
logging.level.it.fabiof=DEBUG
logging.level.it.fabioformosa=DEBUG
Hi @rwellman-ats , a new release (v4.0.4) has been releases with some fixes included the issue you raised. Let me know if you still have some troubles. Going to close this issue.
Note: This may be another issue for me to raise separately, but my app already has AutoWiringSpringBeanJobFactory, scheduler, jobDetail, etc. in my existing @Configuration (as well as existing Quartz jobs). In order to integrate your API/.jars, I had to duplicate some of your SchedulerConfig beans in my @Configuration. I'm still a bit new to the Quartz API but I'm thinking most people will have the same situation as me so you probably need to devise a way to "integrate" with existing application context definitions.