[DEV] upgrade and remove logs

This commit is contained in:
Edouard DUPIN 2023-01-05 00:11:07 +01:00
parent 1a6135f2cf
commit ff9907e341
6 changed files with 61 additions and 10 deletions

View File

@ -14,10 +14,40 @@ mvn clean compile assembly:single
generic interface for all KAR web application
auto-update to the last version dependency:
```bash
mvn versions:use-latest-versions
```
Add Gitea in the dependency for the registry:
=============================================
Read instruction for tocken in ~/.m2/setting.xml
edit file: ```~/.m2/settings.xml```
```xml
<settings>
<servers>
<server>
<id>gitea</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
```
release:
========
export PATH=/usr/lib/jvm/java-18-openjdk/bin:$PATH
mvn install

10
pom.xml
View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>kangaroo-and-rabbit</groupId>
<artifactId>archidata</artifactId>
<version>0.2.0</version>
<version>0.2.2</version>
<properties>
<jaxrs.version>2.1</jaxrs.version>
<jersey.version>2.32</jersey.version>
@ -87,7 +87,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.30</version>
<version>8.0.31</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
@ -101,19 +101,19 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<version>4.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<version>23.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.22</version>
<version>9.27</version>
</dependency>
</dependencies>

View File

@ -557,7 +557,7 @@ public class SqlWrapper {
return getWhere(clazz, List.of(new WhereCondition(key, "=", value)), false);
}
@Deprecated
// keep the simple ...
public static <T> T getWhere(Class<T> clazz, String key, String operator, Object value, boolean full ) throws Exception {
return getWhere(clazz, List.of(new WhereCondition(key, operator, value)), full);
}
@ -687,7 +687,7 @@ public class SqlWrapper {
query.append(".deleted = false ");
*/
firstField = true;
System.out.println("generate the query: '" + query.toString() + "'");
//System.out.println("generate the query: '" + query.toString() + "'");
// prepare the request:
PreparedStatement ps = entry.connection.prepareStatement(query.toString(), Statement.RETURN_GENERATED_KEYS);
int iii = 1;

View File

@ -0,0 +1,10 @@
package org.kar.archidata.exception;
import javax.ws.rs.core.Response;
public class NotFoundException extends FailException {
private static final long serialVersionUID = 1L;
public NotFoundException(String message) {
super(Response.Status.NOT_FOUND, message);
}
}

View File

@ -0,0 +1,14 @@
package org.kar.archidata.model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public final class GetToken {
public final String jwt;
public GetToken(String jwt) {
super();
this.jwt = jwt;
}
}

View File

@ -16,13 +16,10 @@ CREATE TABLE `user` (
import java.sql.Timestamp;
import org.kar.archidata.annotation.SQLAutoIncrement;
import org.kar.archidata.annotation.SQLComment;
import org.kar.archidata.annotation.SQLDefault;
import org.kar.archidata.annotation.SQLIfNotExists;
import org.kar.archidata.annotation.SQLLimitSize;
import org.kar.archidata.annotation.SQLNotNull;
import org.kar.archidata.annotation.SQLPrimaryKey;
import org.kar.archidata.annotation.SQLTableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;