Skip to content

Commit

Permalink
temporary fixes for issues
Browse files Browse the repository at this point in the history
  • Loading branch information
saivivek116 committed Jul 9, 2024
1 parent 40a47ec commit f31e131
Show file tree
Hide file tree
Showing 9 changed files with 329 additions and 167 deletions.
90 changes: 60 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<picocli-version>4.6.3</picocli-version>

<org.springboot-version>2.4.13</org.springboot-version>
<!-- <org.springboot-version>2.4.13</org.springboot-version>-->

<thymeleaf-version>3.0.12.RELEASE</thymeleaf-version>

Expand Down Expand Up @@ -108,6 +108,17 @@
<version>2.1.4</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<!-- <version>5.2.1</version>-->
</dependency>


<dependency>
<groupId>org.postgresql</groupId>
Expand Down Expand Up @@ -168,16 +179,21 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>3.0.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-swagger2</artifactId>-->
<!-- <version>3.0.0</version>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-boot-starter</artifactId>-->
<!-- <version>3.0.0</version>-->
<!-- </dependency>-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.3.0</version>
</dependency>


Expand All @@ -191,11 +207,18 @@
<artifactId>jtar</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
<!-- <dependency>-->
<!-- <groupId>javax.mail</groupId>-->
<!-- <artifactId>mail</artifactId>-->
<!-- <version>1.4.5</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/com.sun.mail/jakarta.mail -->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
</dependency>

<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-gmail</artifactId>
Expand Down Expand Up @@ -279,11 +302,11 @@
<artifactId>commons-codec</artifactId>
</dependency>

<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>commons-httpclient</groupId>-->
<!-- <artifactId>commons-httpclient</artifactId>-->
<!-- <version>3.1</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
Expand Down Expand Up @@ -361,24 +384,31 @@
<artifactId>jakarta.websocket-api</artifactId>
</dependency>

<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-client-api</artifactId>
<version>1.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>javax.websocket</groupId>-->
<!-- <artifactId>javax.websocket-client-api</artifactId>-->
<!-- <version>1.0</version>-->
<!-- </dependency>-->

<dependency>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-standalone-client</artifactId>
<version>1.17</version>
</dependency>

<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>juli</artifactId>
<version>6.0.26</version>
<version>2.1.3</version>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.apache.tomcat</groupId>-->
<!-- <artifactId>juli</artifactId>-->
<!-- <version>6.0.26</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-juli -->
<!-- <dependency>-->
<!-- <groupId>org.apache.tomcat</groupId>-->
<!-- <artifactId>juli</artifactId>-->
<!-- <version>10.x.x</version>-->
<!-- </dependency>-->


<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
Expand Down
30 changes: 18 additions & 12 deletions src/main/java/com/gw/GeoweaverApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;

@SpringBootApplication
@ServletComponentScan
@EnableSwagger2
public class GeoweaverApplication {

static Logger logger = Logger.getLogger(GeoweaverApplication.class);
Expand Down Expand Up @@ -70,12 +72,16 @@ public static void main(String[] args) {
}

@Bean
public Docket geoweaverAPI() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
public OpenAPI geoweaverAPI() {
// return new Docket(DocumentationType.SWAGGER_2)
// .select()
// .apis(RequestHandlerSelectors.any())
// .paths(PathSelectors.any())
// .build();
return new OpenAPI()
.info(new Info().title("Your API Title")
.description("Your API Description")
.version("1.0"));
}

public static void addLocalhost() {
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/com/gw/jpa/Checkpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.UuidGenerator;

import java.util.Date;
import java.util.UUID;
Expand All @@ -29,9 +28,8 @@
public class Checkpoint {

@Id
@GeneratedValue(generator = "uuid2")
@GenericGenerator(name = "uuid2", strategy = "uuid2")
@Type(uuid-char.class)
@GeneratedValue
@UuidGenerator
@Column(name = "id", columnDefinition = "VARCHAR(36)")
private UUID id;

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/gw/server/FileUploadServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.RequestContext;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.slf4j.Logger;
Expand Down Expand Up @@ -86,8 +87,8 @@ public void init(ServletConfig config) throws ServletException {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @param req servlet request
* @param res servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
Expand Down Expand Up @@ -115,7 +116,7 @@ protected void processRequest(HttpServletRequest req, HttpServletResponse res)
// 2000M
// upload.setSizeMax(maxvol * 1024 * 1024);
// HTTP
List fileItems = upload.parseRequest(req);
List fileItems = null;//upload.parseRequest((RequestContext) req);
Iterator iter = fileItems.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
Expand Down
Loading

0 comments on commit f31e131

Please sign in to comment.