Skip to content

Commit

Permalink
chore: cleanup, update common
Browse files Browse the repository at this point in the history
  • Loading branch information
g-otn committed Mar 29, 2024
1 parent 4625ac9 commit 3d40659
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<dependency>
<groupId>com.github.soat-tech-challenge</groupId>
<artifactId>service-common</artifactId>
<version>5.0.0</version>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package br.com.grupo63.serviceorder;

import br.com.grupo63.techchallenge.common.config.auth.jwt.JwtService;
import br.com.grupo63.techchallenge.common.config.aws.ecs.ECSTaskIdInfoContributor;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
Expand All @@ -9,7 +11,6 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@OpenAPIDefinition(
info = @Info(title = "${info.name}", description = "${info.description}", version = "${info.version}"),
Expand All @@ -25,9 +26,12 @@
bearerFormat = "JWT",
in = SecuritySchemeIn.HEADER
)
@SpringBootApplication
@SpringBootApplication(scanBasePackageClasses = {
ServiceOrderApplication.class,
JwtService.class,
ECSTaskIdInfoContributor.class
})
@EnableFeignClients
@ComponentScan(basePackages = {"br.com.grupo63"})
public class ServiceOrderApplication {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package br.com.grupo63.serviceorder.config;

import br.com.grupo63.techchallenge.common.config.JwtFilter;
import br.com.grupo63.techchallenge.common.config.JwtService;
import org.springframework.beans.factory.annotation.Autowired;
import br.com.grupo63.techchallenge.common.config.auth.jwt.JwtFilter;
import br.com.grupo63.techchallenge.common.config.auth.jwt.JwtService;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -12,11 +11,8 @@
@Configuration
public class JwtFilterConfig {

@Autowired
private JwtService jwtService;

@Bean
public FilterRegistrationBean<JwtFilter> jwtFilterFilterRegistrationBean() {
public FilterRegistrationBean<JwtFilter> jwtFilterFilterRegistrationBean(JwtService jwtService) {
FilterRegistrationBean<JwtFilter> jwtFilterFilterRegistrationBean = new FilterRegistrationBean<>();
jwtFilterFilterRegistrationBean.setFilter(new JwtFilter(jwtService));
jwtFilterFilterRegistrationBean.setUrlPatterns(List.of("/orders"));
Expand Down

0 comments on commit 3d40659

Please sign in to comment.