Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 658ccf3

Browse files
add profile properties and turn on actuator
1 parent 0b859c2 commit 658ccf3

File tree

7 files changed

+81
-0
lines changed

7 files changed

+81
-0
lines changed

‎pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<im4java.version>1.4.0</im4java.version>
2828
<p6spy.version>3.7.0</p6spy.version>
2929
<aws-s3.version>1.11.409</aws-s3.version>
30+
<javax.interceptor.version>1.2</javax.interceptor.version>
3031
</properties>
3132

3233
<dependencies>
@@ -69,6 +70,15 @@
6970
<groupId>org.springframework.boot</groupId>
7071
<artifactId>spring-boot-starter-amqp</artifactId>
7172
</dependency>
73+
<dependency>
74+
<groupId>org.springframework.boot</groupId>
75+
<artifactId>spring-boot-starter-actuator</artifactId>
76+
</dependency>
77+
<dependency>
78+
<groupId>javax.interceptor</groupId>
79+
<artifactId>javax.interceptor-api</artifactId>
80+
<version>${javax.interceptor.version}</version>
81+
</dependency>
7282
<dependency>
7383
<groupId>mysql</groupId>
7484
<artifactId>mysql-connector-java</artifactId>
@@ -145,15 +155,32 @@
145155

146156
<build>
147157
<plugins>
158+
<plugin>
159+
<groupId>pl.project13.maven</groupId>
160+
<artifactId>git-commit-id-plugin</artifactId>
161+
</plugin>
148162
<plugin>
149163
<groupId>org.springframework.boot</groupId>
150164
<artifactId>spring-boot-maven-plugin</artifactId>
165+
<configuration>
166+
<executable>true</executable>
167+
</configuration>
151168
<executions>
169+
<execution>
170+
<goals>
171+
<goal>build-info</goal>
172+
</goals>
173+
</execution>
152174
<execution>
153175
<id>pre integration test</id>
154176
<goals>
155177
<goal>start</goal>
156178
</goals>
179+
<configuration>
180+
<profiles>
181+
<profile>e2e</profile>
182+
</profiles>
183+
</configuration>
157184
</execution>
158185
<execution>
159186
<id>post integration test</id>

‎src/main/java/com/taskagile/config/ApplicationProperties.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public class ApplicationProperties {
3535
@NotNull
3636
private ImageSetting image;
3737

38+
private CdnSetting cdn;
39+
3840
public void setMailFrom(String mailFrom) {
3941
this.mailFrom = mailFrom;
4042
}
@@ -75,6 +77,14 @@ public void setImage(ImageSetting image) {
7577
this.image = image;
7678
}
7779

80+
public CdnSetting getCdn() {
81+
return cdn;
82+
}
83+
84+
public void setCdn(CdnSetting cdn) {
85+
this.cdn = cdn;
86+
}
87+
7888
//---------------------------------------
7989
// Setting structure classes
8090
//---------------------------------------
@@ -166,4 +176,16 @@ public void setCommandSearchPath(String commandSearchPath) {
166176
this.commandSearchPath = commandSearchPath;
167177
}
168178
}
179+
180+
private static class CdnSetting {
181+
private String url = "http://taskagile.local";
182+
183+
public String getUrl() {
184+
return url;
185+
}
186+
187+
public void setUrl(String url) {
188+
this.url = url;
189+
}
190+
}
169191
}

‎src/main/java/com/taskagile/config/SecurityConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.taskagile.web.apis.authenticate.SimpleAuthenticationFailureHandler;
77
import com.taskagile.web.apis.authenticate.SimpleAuthenticationSuccessHandler;
88
import com.taskagile.web.apis.authenticate.SimpleLogoutSuccessHandler;
9+
import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
910
import org.springframework.context.annotation.Bean;
1011
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
1112
import org.springframework.security.config.annotation.web.builders.WebSecurity;
@@ -33,6 +34,7 @@ protected void configure(HttpSecurity http) throws Exception {
3334
.and()
3435
.authorizeRequests()
3536
.antMatchers(PUBLIC).permitAll()
37+
.requestMatchers(EndpointRequest.toAnyEndpoint()).permitAll()
3638
.anyRequest().authenticated()
3739
.and()
3840
.addFilterAt(authenticationFilter(), UsernamePasswordAuthenticationFilter.class)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
spring.datasource.url=jdbc:mysql://localhost:3306/task_agile_e2e?useSSL=false
2+
spring.datasource.username=root
3+
spring.datasource.password=1234
4+
5+
spring.jpa.hibernate.ddl-auto=create-drop
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
spring.datasource.url=jdbc:mysql://localhost:3306/task_agile?useSSL=false
2+
3+
spring.mail.host=localhost
4+
spring.mail.port=25
5+
6+
logging.level.com.taskagile=INFO
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
spring.datasource.url=jdbc:mysql://localhost:3306/task_agile?useSSL=false
2+
3+
spring.mail.host=localhost
4+
spring.mail.port=25
5+
6+
logging.level.com.taskagile=DEBUG

‎src/main/resources/application.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,15 @@ spring.mail.properties.mail.smtp.auth=false
3939

4040
logging.level.com.taskagile=DEBUG
4141
logging.level.org.springframework.security=DEBUG
42+
43+
# Actuator setting
44+
management.server.port=9000
45+
management.endpoint.health.show-details=always
46+
management.endpoints.web.exposure.include=health, info, metrics, env
47+
48+
info.app.name=@name@
49+
info.app.description=@description@
50+
info.app.encoding=@project.build.sourceEncoding@
51+
info.app.java.source=@java.version@
52+
info.app.java.target=@java.version@
53+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /