一些简单的 RabbitMQ 学习和使用笔记。
……
设置 编辑文件: sudo vim /etc/fdfs/http.conf 修改如下: # 是否启用密钥访问 http.anti_steal.check_token = true # 访问密钥 http.anti_steal.secret_key = FastDFS1234567890 # 错误密钥访问……
依赖(用的其他人传的老版本的): <dependency> <groupId>net.oschina.zcx7878</groupId> <artifactId>fastdfs-client-java</artifactId> <version>1.27.0.0</version> </dependency> 上传 测试代码: @SpringBootTest class FastdfsdemoApplicationTests { @Test void contextLoads() throws IOException, MyException { ClientGlobal.initByProperties("fastdfs-client.properties"); TrackerClient trackerClient……
集群部署 准备三台服务器,其 IP 为 192.168.15.130、192.168.15.1……
FastDFS # 安装编译所需的库和工具 sudo apt -y install libev-dev git gcc g++ make automake autoconf libtool pcre2-utils libpcre2-dev zlib1g zlib1g-dev openssl libssh-dev wget vim # fastdfs 文件存储路径 sudo……
在前面的章节中,我使用的用户信息都是基于代码配置、信息存于内存,在实际项目中,用户认……
测试用户(暂用 inMemoryAuthentication): @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication() .withUser("bolitao") .password("bolitao")……
登陆成功返回 json 修改 configure(HttpSecurity http) 如下: @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .anyRequest().authenticated() .and() .formLogin() .loginPage("/login.html") .loginProcessingUrl("/login") .usernameParameter("username") .passwordParameter("passwd") .successHandler((req, resp, authentication) -> { resp.setContentType("application/json;charset=utf-8"); PrintWriter writer = resp.getWriter(); writer.write(new ObjectMapper().writeValueAsString(authentication.getPrincipal()));……
使用 spring-boot,依赖添加 starter-web 和 starter-security。 默认配置 对……
依赖 spring boot 2.2.5.RELEASE,其他: <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.62</version> </dependency> <!-- jsoup --> <dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>1.10.2</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>……