+HTTPS
This commit is contained in:
@ -1,35 +0,0 @@
|
|||||||
spring.application.name=org.ccalm.main
|
|
||||||
server.port=8081
|
|
||||||
|
|
||||||
logging.level.com.zaxxer.hikari=DEBUG
|
|
||||||
|
|
||||||
spring.datasource.url=jdbc:postgresql://91.201.214.156:5432/CCALM
|
|
||||||
spring.datasource.username=postgres
|
|
||||||
spring.datasource.password=PasSecrKey1
|
|
||||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
|
||||||
|
|
||||||
spring.datasource.hikari.maximum-pool-size=10
|
|
||||||
spring.datasource.hikari.minimum-idle=5
|
|
||||||
spring.datasource.hikari.max-lifetime=1700000
|
|
||||||
spring.datasource.hikari.idle-timeout=600000
|
|
||||||
spring.datasource.hikari.connection-timeout=30000
|
|
||||||
spring.datasource.hikari.connection-test-query=SELECT now()
|
|
||||||
spring.datasource.hikari.validation-timeout=60000
|
|
||||||
|
|
||||||
public.key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzYLWgn7uUJYVn1PGyQKKC6F/m6PwEbL6FlCX+TaHZBjor83uS6rbuXquqbU/oFSiviBLI6Zg7BTzAhNglu8S2X4G7a1pkz3fn4kW9mf3zLnXnaNeuh+VhIEt/kw1ire1pCwP95KryKnQaLbi+ARDcGY+giIxjXRtNUTbAmgwP78U5M8fZ48+pH4AHWv/sG3TiTcIzUYCG/QMnnUE+Tir6kV3qrs66zig/cK5tTuJ7/JQOlhYOWBDElu0+lkSHgK2bEK9Wh7+qpIruO2K3gKX3RSFh8XfUIpwPVqyz2HVlzja+/scr6kuDB0iYfWZgrzLHPx3Bd0RyYBMIIgvBOoYmQIDAQAB
|
|
||||||
access.time=600
|
|
||||||
refresh.time=43200
|
|
||||||
|
|
||||||
captcha.key=PPExpv36jk4Vzda3NpYnXLfuHCLYXqaNrxlOH/Jr/1M=
|
|
||||||
captcha.time=600
|
|
||||||
|
|
||||||
mail.host=smtp.yandex.ru
|
|
||||||
mail.port=465
|
|
||||||
mail.login=info@ccalm.org
|
|
||||||
mail.password=fu2lpsoGPGiq1xlRm8ag
|
|
||||||
|
|
||||||
spring.redis.host=127.0.0.1
|
|
||||||
spring.redis.port=6379
|
|
||||||
spring.redis.password=9F3/NKWeOjd815vkadT2DcgVHf6fEpVQXw==
|
|
||||||
|
|
||||||
data.dir=logs/
|
|
||||||
55
org_ccalm_main.yml
Normal file
55
org_ccalm_main.yml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
server:
|
||||||
|
port: 8081
|
||||||
|
ssl:
|
||||||
|
enabled: true
|
||||||
|
key-store: classpath:keystore.jks
|
||||||
|
key-store-password: MFNX344yh4
|
||||||
|
key-store-type: PKCS12
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: org.ccalm.main
|
||||||
|
datasource:
|
||||||
|
url: jdbc:postgresql://91.201.214.156:5432/CCALM
|
||||||
|
username: postgres
|
||||||
|
password: PasSecrKey1
|
||||||
|
driver-class-name: org.postgresql.Driver
|
||||||
|
hikari:
|
||||||
|
maximum-pool-size: 10
|
||||||
|
minimum-idle: 5
|
||||||
|
max-lifetime: 600000
|
||||||
|
idle-timeout: 300000
|
||||||
|
connection-timeout: 30000
|
||||||
|
connection-test-query: SELECT 1
|
||||||
|
validation-timeout: 5000
|
||||||
|
validation-interval: 60000
|
||||||
|
redis:
|
||||||
|
host: 127.0.0.1
|
||||||
|
port: 6379
|
||||||
|
password: 9F3/NKWeOjd815vkadT2DcgVHf6fEpVQXw==
|
||||||
|
|
||||||
|
public:
|
||||||
|
key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzYLWgn7uUJYVn1PGyQKKC6F/m6PwEbL6FlCX+TaHZBjor83uS6rbuXquqbU/oFSiviBLI6Zg7BTzAhNglu8S2X4G7a1pkz3fn4kW9mf3zLnXnaNeuh+VhIEt/kw1ire1pCwP95KryKnQaLbi+ARDcGY+giIxjXRtNUTbAmgwP78U5M8fZ48+pH4AHWv/sG3TiTcIzUYCG/QMnnUE+Tir6kV3qrs66zig/cK5tTuJ7/JQOlhYOWBDElu0+lkSHgK2bEK9Wh7+qpIruO2K3gKX3RSFh8XfUIpwPVqyz2HVlzja+/scr6kuDB0iYfWZgrzLHPx3Bd0RyYBMIIgvBOoYmQIDAQAB
|
||||||
|
access:
|
||||||
|
time: 600
|
||||||
|
refresh:
|
||||||
|
time: 43200
|
||||||
|
|
||||||
|
captcha:
|
||||||
|
key: PPExpv36jk4Vzda3NpYnXLfuHCLYXqaNrxlOH/Jr/1M=
|
||||||
|
time: 600
|
||||||
|
|
||||||
|
mail:
|
||||||
|
host: smtp.yandex.ru
|
||||||
|
port: 465
|
||||||
|
login: info@ccalm.org
|
||||||
|
password: fu2lpsoGPGiq1xlRm8ag
|
||||||
|
|
||||||
|
data:
|
||||||
|
dir: logs/
|
||||||
|
|
||||||
|
#logging:
|
||||||
|
# level:
|
||||||
|
# com:
|
||||||
|
# zaxxer:
|
||||||
|
# hikari: DEBUG
|
||||||
3
pom.xml
3
pom.xml
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.2.4</version>
|
<version>3.3.3</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.ccalm</groupId>
|
<groupId>org.ccalm</groupId>
|
||||||
@ -60,6 +60,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>42.7.4</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -127,7 +127,7 @@ public class MainController implements ServletContextAware {
|
|||||||
//Returns data for building a map on the first index page
|
//Returns data for building a map on the first index page
|
||||||
@RequestMapping(value = "/dataindex",method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json; charset=utf-8")
|
@RequestMapping(value = "/dataindex",method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json; charset=utf-8")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object ajaxIndexData(HttpServletResponse response,@ModelAttribute User user,@RequestParam(required=false,name="date_start",defaultValue = "null") String date_start,@RequestParam(required=false,name="date_end",defaultValue = "null") String date_end, @RequestParam(required=false,name="lng") String language_id) {
|
public Object ajaxIndexData(HttpServletResponse response,@ModelAttribute User user,@RequestParam(required=false,name="date_start") String date_start,@RequestParam(required=false,name="date_end") String date_end, @RequestParam(required=false,name="lng") String language_id) {
|
||||||
String headerValue = CacheControl.maxAge(60, TimeUnit.SECONDS).getHeaderValue();
|
String headerValue = CacheControl.maxAge(60, TimeUnit.SECONDS).getHeaderValue();
|
||||||
response.addHeader("Cache-Control", headerValue);
|
response.addHeader("Cache-Control", headerValue);
|
||||||
|
|
||||||
@ -145,8 +145,14 @@ public class MainController implements ServletContextAware {
|
|||||||
from main.p_dataindex(to_timestamp(:date_start)::timestamp without time zone,to_timestamp(:date_end)::timestamp without time zone);
|
from main.p_dataindex(to_timestamp(:date_start)::timestamp without time zone,to_timestamp(:date_end)::timestamp without time zone);
|
||||||
""";
|
""";
|
||||||
MapSqlParameterSource parameters = new MapSqlParameterSource();
|
MapSqlParameterSource parameters = new MapSqlParameterSource();
|
||||||
parameters.addValue("date_start", date_start, Types.INTEGER);
|
if (date_start!=null)
|
||||||
parameters.addValue("date_end", date_end, Types.INTEGER);
|
parameters.addValue("date_start", Double.valueOf(date_start), Types.INTEGER);
|
||||||
|
else
|
||||||
|
parameters.addValue("date_start", null, Types.INTEGER);
|
||||||
|
if (date_end!=null)
|
||||||
|
parameters.addValue("date_end", Double.valueOf(date_end), Types.INTEGER);
|
||||||
|
else
|
||||||
|
parameters.addValue("date_end", null, Types.INTEGER);
|
||||||
List<String> ret = jdbcTemplate.query(sql, parameters, new DBTools.JsonRowMapper());
|
List<String> ret = jdbcTemplate.query(sql, parameters, new DBTools.JsonRowMapper());
|
||||||
for (int i = 0; i < ret.size(); i++) {
|
for (int i = 0; i < ret.size(); i++) {
|
||||||
JSONObject rsRez = new JSONObject(ret.get(i));
|
JSONObject rsRez = new JSONObject(ret.get(i));
|
||||||
|
|||||||
BIN
src/main/resources/keystore.jks
Normal file
BIN
src/main/resources/keystore.jks
Normal file
Binary file not shown.
@ -23,7 +23,8 @@
|
|||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<root level="info">
|
<!--root level="info"-->
|
||||||
|
<root level="warn">
|
||||||
<appender-ref ref="FILE" />
|
<appender-ref ref="FILE" />
|
||||||
<appender-ref ref="CONSOLE" />
|
<appender-ref ref="CONSOLE" />
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
Reference in New Issue
Block a user